public static class DerivedCollectionGenerators.MapKeySetGenerator<K,V> extends Object implements TestSetGenerator<K>, DerivedGenerator
Constructor and Description |
---|
DerivedCollectionGenerators.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()
TestContainerGenerator
samples
in interface TestContainerGenerator<Collection<K>,K>
public Set<K> create(Object... elements)
TestContainerGenerator
create
in interface TestContainerGenerator<Collection<K>,K>
create
in interface TestSetGenerator<K>
public K[] createArray(int length)
TestContainerGenerator
createArray
in interface TestContainerGenerator<Collection<K>,K>
public Iterable<K> order(List<K> insertionOrder)
TestContainerGenerator
If 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 DerivedGenerator
Copyright © 2010-2016. All Rights Reserved.