public static class DerivedCollectionGenerators.MapKeySetGenerator<K,V> extends Object implements TestSetGenerator<K>, DerivedGenerator
| Constructor and Description |
|---|
MapKeySetGenerator(OneSizeTestContainerGenerator<Map<K,V>,Map.Entry<K,V>> mapGenerator) |
| Modifier and Type | Method and Description |
|---|---|
Set<K> |
create(Object... elements)
Creates a new container containing the given elements.
|
K[] |
createArray(int length)
Helper method to create an array of the appropriate type used by this
generator.
|
OneSizeTestContainerGenerator<Map<K,V>,Map.Entry<K,V>> |
getInnerGenerator() |
Iterable<K> |
order(List<K> insertionOrder)
Returns the iteration ordering of elements, given the order in
which they were added to the container.
|
SampleElements<K> |
samples()
Returns the sample elements that this generate populates its container
with.
|
public SampleElements<K> samples()
TestContainerGeneratorsamples in interface TestContainerGenerator<Collection<K>,K>public Set<K> create(Object... elements)
TestContainerGeneratorcreate in interface TestContainerGenerator<Collection<K>,K>create in interface TestSetGenerator<K>public K[] createArray(int length)
TestContainerGeneratorcreateArray in interface TestContainerGenerator<Collection<K>,K>public Iterable<K> order(List<K> insertionOrder)
TestContainerGeneratorIf the order is non-deterministic, as with HashSet,
this method can return its input unmodified. Provided that the test suite
is built without CollectionFeature.KNOWN_ORDER,
the tests will look only at the returned contents without regard for order.
order in interface TestContainerGenerator<Collection<K>,K>public OneSizeTestContainerGenerator<Map<K,V>,Map.Entry<K,V>> getInnerGenerator()
getInnerGenerator in interface DerivedGeneratorCopyright © 2010–2017. All rights reserved.