@GwtCompatible public abstract class TestEnumMultisetGenerator extends Object implements TestMultisetGenerator<AnEnum>
An abstract TestMultisetGenerator for generating multisets containing enum values.
| Constructor and Description |
|---|
TestEnumMultisetGenerator() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Multiset<AnEnum> |
create(AnEnum[] elements) |
Multiset<AnEnum> |
create(Object... elements)
Creates a new container containing the given elements.
|
AnEnum[] |
createArray(int length)
Helper method to create an array of the appropriate type used by this generator.
|
List<AnEnum> |
order(List<AnEnum> insertionOrder)
Sorts the enums according to their natural ordering.
|
SampleElements<AnEnum> |
samples()
Returns the sample elements that this generate populates its container with.
|
public SampleElements<AnEnum> samples()
TestContainerGeneratorReturns the sample elements that this generate populates its container with.
samples in interface TestContainerGenerator<Collection<AnEnum>,AnEnum>public Multiset<AnEnum> create(Object... elements)
TestContainerGeneratorCreates a new container containing the given elements. TODO: would be nice to figure out how to use E… or E[] as a parameter type, but this doesn’t seem to work because Java creates an array of the erased type.
create in interface TestMultisetGenerator<AnEnum>create in interface TestContainerGenerator<Collection<AnEnum>,AnEnum>public AnEnum[] createArray(int length)
TestContainerGeneratorHelper method to create an array of the appropriate type used by this generator. The returned array will contain only nulls.
createArray in interface TestContainerGenerator<Collection<AnEnum>,AnEnum>public List<AnEnum> order(List<AnEnum> insertionOrder)
Sorts the enums according to their natural ordering.
order in interface TestContainerGenerator<Collection<AnEnum>,AnEnum>