Class TestStringSortedSetGenerator
- java.lang.Object
-
- com.google.common.collect.testing.TestStringSetGenerator
-
- com.google.common.collect.testing.TestStringSortedSetGenerator
-
- All Implemented Interfaces:
TestCollectionGenerator<java.lang.String>,TestContainerGenerator<java.util.Collection<java.lang.String>,java.lang.String>,TestSetGenerator<java.lang.String>,TestSortedSetGenerator<java.lang.String>
- Direct Known Subclasses:
SetGenerators.ImmutableSortedSetCopyOfGenerator,SetGenerators.ImmutableSortedSetDescendingGenerator,SetGenerators.ImmutableSortedSetHeadsetGenerator,SetGenerators.ImmutableSortedSetSubsetGenerator,SetGenerators.ImmutableSortedSetTailsetGenerator
public abstract class TestStringSortedSetGenerator extends TestStringSetGenerator implements TestSortedSetGenerator<java.lang.String>
Create string sets for testing collections that are sorted by natural ordering.
-
-
Constructor Summary
Constructors Constructor Description TestStringSortedSetGenerator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.StringaboveSamplesGreater()Returns an element greater than theTestContainerGenerator.samples()and greater thanTestSortedSetGenerator.aboveSamplesLesser().java.lang.StringaboveSamplesLesser()Returns an element greater than theTestContainerGenerator.samples()but less thanTestSortedSetGenerator.aboveSamplesGreater().java.lang.StringbelowSamplesGreater()Returns an element less than theTestContainerGenerator.samples()but greater thanTestSortedSetGenerator.belowSamplesLesser().java.lang.StringbelowSamplesLesser()Returns an element less than theTestContainerGenerator.samples()and less thanTestSortedSetGenerator.belowSamplesGreater().java.util.SortedSet<java.lang.String>create(java.lang.Object... elements)Creates a new container containing the given elements.protected abstract java.util.SortedSet<java.lang.String>create(java.lang.String[] elements)java.util.List<java.lang.String>order(java.util.List<java.lang.String> insertionOrder)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
-
-
-
-
Method Detail
-
create
public java.util.SortedSet<java.lang.String> create(java.lang.Object... elements)
Description copied from interface: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.- Specified by:
createin interfaceTestContainerGenerator<java.util.Collection<java.lang.String>,java.lang.String>- Specified by:
createin interfaceTestSetGenerator<java.lang.String>- Specified by:
createin interfaceTestSortedSetGenerator<java.lang.String>- Overrides:
createin classTestStringSetGenerator
-
create
protected abstract java.util.SortedSet<java.lang.String> create(java.lang.String[] elements)
- Specified by:
createin classTestStringSetGenerator
-
order
public java.util.List<java.lang.String> order(java.util.List<java.lang.String> insertionOrder)
Sorts the elements by their natural ordering.- Specified by:
orderin interfaceTestContainerGenerator<java.util.Collection<java.lang.String>,java.lang.String>- Overrides:
orderin classTestStringSetGenerator
-
belowSamplesLesser
public java.lang.String belowSamplesLesser()
Description copied from interface:TestSortedSetGeneratorReturns an element less than theTestContainerGenerator.samples()and less thanTestSortedSetGenerator.belowSamplesGreater().- Specified by:
belowSamplesLesserin interfaceTestSortedSetGenerator<java.lang.String>
-
belowSamplesGreater
public java.lang.String belowSamplesGreater()
Description copied from interface:TestSortedSetGeneratorReturns an element less than theTestContainerGenerator.samples()but greater thanTestSortedSetGenerator.belowSamplesLesser().- Specified by:
belowSamplesGreaterin interfaceTestSortedSetGenerator<java.lang.String>
-
aboveSamplesLesser
public java.lang.String aboveSamplesLesser()
Description copied from interface:TestSortedSetGeneratorReturns an element greater than theTestContainerGenerator.samples()but less thanTestSortedSetGenerator.aboveSamplesGreater().- Specified by:
aboveSamplesLesserin interfaceTestSortedSetGenerator<java.lang.String>
-
aboveSamplesGreater
public java.lang.String aboveSamplesGreater()
Description copied from interface:TestSortedSetGeneratorReturns an element greater than theTestContainerGenerator.samples()and greater thanTestSortedSetGenerator.aboveSamplesLesser().- Specified by:
aboveSamplesGreaterin interfaceTestSortedSetGenerator<java.lang.String>
-
-