Class TestStringSortedSetGenerator
java.lang.Object
com.google.common.collect.testing.TestStringSetGenerator
com.google.common.collect.testing.TestStringSortedSetGenerator
- All Implemented Interfaces:
TestCollectionGenerator<String>
,TestContainerGenerator<Collection<String>, String>
,TestSetGenerator<String>
,TestSortedSetGenerator<String>
- Direct Known Subclasses:
SetGenerators.ImmutableSortedSetCopyOfGenerator
,SetGenerators.ImmutableSortedSetDescendingGenerator
,SetGenerators.ImmutableSortedSetHeadsetGenerator
,SetGenerators.ImmutableSortedSetSubsetGenerator
,SetGenerators.ImmutableSortedSetTailsetGenerator
@GwtCompatible
@NullMarked
public abstract class TestStringSortedSetGenerator
extends TestStringSetGenerator
implements TestSortedSetGenerator<String>
Create string sets for testing collections that are sorted by natural ordering.
- Author:
- Jared Levy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns an element greater than theTestContainerGenerator.samples()
and greater thanTestSortedSetGenerator.aboveSamplesLesser()
.Returns an element greater than theTestContainerGenerator.samples()
but less thanTestSortedSetGenerator.aboveSamplesGreater()
.Returns an element less than theTestContainerGenerator.samples()
but greater thanTestSortedSetGenerator.belowSamplesLesser()
.Returns an element less than theTestContainerGenerator.samples()
and less thanTestSortedSetGenerator.belowSamplesGreater()
.Creates a new container containing the given elements.Sorts the elements by their natural ordering.Methods inherited from class com.google.common.collect.testing.TestStringSetGenerator
createArray, samples
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.common.collect.testing.TestContainerGenerator
createArray, samples
-
Constructor Details
-
TestStringSortedSetGenerator
public TestStringSortedSetGenerator()
-
-
Method Details
-
create
Description copied from interface:TestContainerGenerator
Creates 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.- Specified by:
create
in interfaceTestContainerGenerator<Collection<String>, String>
- Specified by:
create
in interfaceTestSetGenerator<String>
- Specified by:
create
in interfaceTestSortedSetGenerator<String>
- Overrides:
create
in classTestStringSetGenerator
-
create
- Specified by:
create
in classTestStringSetGenerator
-
order
Sorts the elements by their natural ordering.- Specified by:
order
in interfaceTestContainerGenerator<Collection<String>, String>
- Overrides:
order
in classTestStringSetGenerator
-
belowSamplesLesser
Description copied from interface:TestSortedSetGenerator
Returns an element less than theTestContainerGenerator.samples()
and less thanTestSortedSetGenerator.belowSamplesGreater()
.- Specified by:
belowSamplesLesser
in interfaceTestSortedSetGenerator<String>
-
belowSamplesGreater
Description copied from interface:TestSortedSetGenerator
Returns an element less than theTestContainerGenerator.samples()
but greater thanTestSortedSetGenerator.belowSamplesLesser()
.- Specified by:
belowSamplesGreater
in interfaceTestSortedSetGenerator<String>
-
aboveSamplesLesser
Description copied from interface:TestSortedSetGenerator
Returns an element greater than theTestContainerGenerator.samples()
but less thanTestSortedSetGenerator.aboveSamplesGreater()
.- Specified by:
aboveSamplesLesser
in interfaceTestSortedSetGenerator<String>
-
aboveSamplesGreater
Description copied from interface:TestSortedSetGenerator
Returns an element greater than theTestContainerGenerator.samples()
and greater thanTestSortedSetGenerator.aboveSamplesLesser()
.- Specified by:
aboveSamplesGreater
in interfaceTestSortedSetGenerator<String>
-