static class MultisetTestSuiteBuilder.EntrySetGenerator<E> extends java.lang.Object implements TestSetGenerator<Multiset.Entry<E>>
Modifier and Type | Field and Description |
---|---|
(package private) OneSizeTestContainerGenerator<java.util.Collection<E>,E> |
gen |
Modifier | Constructor and Description |
---|---|
private |
EntrySetGenerator(OneSizeTestContainerGenerator<java.util.Collection<E>,E> gen) |
Modifier and Type | Method and Description |
---|---|
java.util.Set<Multiset.Entry<E>> |
create(java.lang.Object... entries)
Creates a new container containing the given elements.
|
Multiset.Entry<E>[] |
createArray(int length)
Helper method to create an array of the appropriate type used by this
generator.
|
java.lang.Iterable<Multiset.Entry<E>> |
order(java.util.List<Multiset.Entry<E>> insertionOrder)
Returns the iteration ordering of elements, given the order in
which they were added to the container.
|
SampleElements<Multiset.Entry<E>> |
samples()
Returns the sample elements that this generate populates its container
with.
|
final OneSizeTestContainerGenerator<java.util.Collection<E>,E> gen
private EntrySetGenerator(OneSizeTestContainerGenerator<java.util.Collection<E>,E> gen)
public SampleElements<Multiset.Entry<E>> samples()
TestContainerGenerator
samples
in interface TestContainerGenerator<java.util.Collection<Multiset.Entry<E>>,Multiset.Entry<E>>
public java.util.Set<Multiset.Entry<E>> create(java.lang.Object... entries)
TestContainerGenerator
create
in interface TestContainerGenerator<java.util.Collection<Multiset.Entry<E>>,Multiset.Entry<E>>
create
in interface TestSetGenerator<Multiset.Entry<E>>
public Multiset.Entry<E>[] createArray(int length)
TestContainerGenerator
createArray
in interface TestContainerGenerator<java.util.Collection<Multiset.Entry<E>>,Multiset.Entry<E>>
public java.lang.Iterable<Multiset.Entry<E>> order(java.util.List<Multiset.Entry<E>> 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<java.util.Collection<Multiset.Entry<E>>,Multiset.Entry<E>>