@GwtCompatible public abstract class TestEnumMapGenerator extends Object implements TestMapGenerator<AnEnum,String>
Implementation helper for TestMapGenerator for use with enum maps.
| Constructor and Description |
|---|
TestEnumMapGenerator() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Map<AnEnum,String> |
create(Map.Entry<AnEnum,String>[] entries) |
Map<AnEnum,String> |
create(Object... entries)
Creates a new container containing the given elements.
|
Map.Entry<AnEnum,String>[] |
createArray(int length)
Helper method to create an array of the appropriate type used by this generator.
|
AnEnum[] |
createKeyArray(int length) |
String[] |
createValueArray(int length) |
Iterable<Map.Entry<AnEnum,String>> |
order(List<Map.Entry<AnEnum,String>> insertionOrder)
Returns the elements sorted in natural order.
|
SampleElements<Map.Entry<AnEnum,String>> |
samples()
Returns the sample elements that this generate populates its container with.
|
public SampleElements<Map.Entry<AnEnum,String>> samples()
TestContainerGeneratorReturns the sample elements that this generate populates its container with.
public final Map<AnEnum,String> create(Object... entries)
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.
public final Map.Entry<AnEnum,String>[] 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<Map<AnEnum,String>,Map.Entry<AnEnum,String>>public final AnEnum[] createKeyArray(int length)
createKeyArray in interface TestMapGenerator<AnEnum,String>public final String[] createValueArray(int length)
createValueArray in interface TestMapGenerator<AnEnum,String>