Class ImmutableEmptySortedSet<T>
java.lang.Object
org.eclipse.collections.impl.AbstractRichIterable<T>
org.eclipse.collections.impl.collection.immutable.AbstractImmutableCollection<T>
org.eclipse.collections.impl.set.sorted.immutable.AbstractImmutableSortedSet<T>
org.eclipse.collections.impl.set.sorted.immutable.ImmutableEmptySortedSet<T>
- All Implemented Interfaces:
Serializable, Comparable<SortedSetIterable<T>>, Iterable<T>, Collection<T>, SequencedCollection<T>, SequencedSet<T>, Set<T>, SortedSet<T>, ImmutableCollection<T>, InternalIterable<T>, OrderedIterable<T>, ReversibleIterable<T>, SortedIterable<T>, RichIterable<T>, ImmutableSetIterable<T>, SetIterable<T>, ImmutableSortedSet<T>, SortedSetIterable<T>
final class ImmutableEmptySortedSet<T>
extends AbstractImmutableSortedSet<T>
implements Serializable
This is a zero element
ImmutableSortedSet which is created by calling the SortedSets.immutable.empty() method.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Comparator<? super T> (package private) static final ImmutableSortedSet<?> private static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<V> ImmutableList<V> collectWithIndex(ObjectIntToObjectFunction<? super T, ? extends V> function) Returns a new OrderedIterable using results obtained by applying the specified function to each element and its corresponding index.<V, R extends Collection<V>>
RcollectWithIndex(ObjectIntToObjectFunction<? super T, ? extends V> function, R target) Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.Comparator<? super T> Returns the comparator used to order the elements in this set, or null if this set uses the natural ordering of its elements.intbooleanReturns true if the iterable has an element which responds true to element.equals(object).drop(int count) Returns an iterable after skipping the firstcountelements or an empty iterable if thecountis greater than the length of the iterable.voidThe procedure is executed for each element in the iterable.booleanFollows the same general contract asSet.equals(Object).first()voidIterates over the section of the iterable covered by the specified inclusive indexes.<P> voidforEachWith(Procedure2<? super T, ? super P> procedure, P parameter) The procedure2 is evaluated for each element in the iterable with the specified parameter provided as the second argument.voidforEachWithIndex(int fromIndex, int toIndex, ObjectIntProcedure<? super T> objectIntProcedure) Iterates over the section of the iterable covered by the specified inclusive indexes.voidforEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure) Iterates over the iterable passing each element and the current relative int index to the specified instance of ObjectIntProcedure.getOnly()Returns the element if the iterable has exactly one element.inthashCode()Follows the same general contract asSet.hashCode().iterator()last()max()Returns the maximum element out of this container based on the natural order.max(Comparator<? super T> comparator) Returns the maximum element out of this container based on the comparator.<V extends Comparable<? super V>>
TReturns the maximum elements out of this container based on the natural order of the attribute returned by Function.min()Returns the minimum element out of this container based on the natural order.min(Comparator<? super T> comparator) Returns the minimum element out of this container based on the comparator.<V extends Comparable<? super V>>
TReturns the minimum elements out of this container based on the natural order of the attribute returned by Function.This method is similar to thewithmethod inMutableCollectionwith the difference that a new copy of this collection with the element appended will be returned.newWithAll(Iterable<? extends T> elements) This method is similar to thewithAllmethod inMutableCollectionwith the difference that a new copy of this collection with the elements appended will be returned.newWithout(T element) This method is similar to thewithoutmethod inMutableCollectionwith the difference that a new copy of this collection with the element removed will be returned.newWithoutAll(Iterable<? extends T> elements) This method is similar to thewithoutAllmethod inMutableCollectionwith the difference that a new copy of this collection with the elements removed will be returned.Returns all elements of the source collection that return false when evaluating of the predicate.<P> ImmutableSortedSet<T> rejectWith(Predicate2<? super T, ? super P> predicate, P parameter) Similar toRichIterable.reject(Predicate), except with an evaluation parameter for the second generic argument inPredicate2.Returns all elements of the source collection that return true when evaluating the predicate.<S> ImmutableSortedSet<S> selectInstancesOf(Class<S> clazz) Returns all elements of the source collection that are instances of the Classclazz.<P> ImmutableSortedSet<T> selectWith(Predicate2<? super T, ? super P> predicate, P parameter) Similar toRichIterable.select(Predicate), except with an evaluation parameter for the second generic argument inPredicate2.intsize()Returns the number of items in this iterable.take(int count) Returns the firstcountelements of the iterable or all the elements in the iterable ifcountis greater than the length of the iterable.Executes the Procedure for each element in the iterable and returnsthis.toStack()Converts the OrderedIterable to a mutable MutableStack implementation.private Object<S, R extends Collection<Pair<T,S>>>
RSame asRichIterable.zip(Iterable)but usestargetfor output.<R extends Collection<Pair<T,Integer>>>
RzipWithIndex(R target) Same asRichIterable.zipWithIndex()but usestargetfor output.Methods inherited from class AbstractImmutableSortedSet
asParallel, cartesianProduct, castToSortedSet, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, corresponds, detectIndex, detectLastIndex, difference, differenceInto, distinct, dropWhile, flatCollect, getFirst, getLast, groupBy, groupByEach, headSet, intersect, intersectInto, isProperSubsetOf, isSubsetOf, newMutable, partition, partitionWhile, partitionWith, powerSet, subSet, symmetricDifference, symmetricDifferenceInto, tailSet, takeWhile, toImmutable, toReversed, union, unionInto, zip, zipWithIndexMethods inherited from class AbstractImmutableCollection
add, addAll, castToCollection, chunk, clear, countBy, countByEach, countByWith, groupByUniqueKey, parallelStream, reduce, remove, removeAll, removeAllFrom, retainAll, spliterator, stream, sumByDouble, sumByFloat, sumByInt, sumByLong, toArray, toArrayMethods inherited from class AbstractRichIterable
allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, asLazy, collect, collectIf, collectWith, containsAll, containsAllArguments, containsAllIterable, count, countWith, detect, detectOptional, detectWith, detectWithIfNone, detectWithOptional, flatCollect, forEach, groupBy, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, into, isEmpty, noneSatisfy, noneSatisfyWith, reject, rejectWith, select, selectWith, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toBag, toBiMap, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toStringMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface ImmutableCollection
aggregateBy, aggregateInPlaceBy, castToCollection, countBy, countByEach, countByWith, flatCollectWith, groupByUniqueKey, parallelStream, reduceBy, spliterator, stream, sumByDouble, sumByFloat, sumByInt, sumByLongMethods inherited from interface ImmutableSortedSet
flatCollectWith, toImmutableSortedSetMethods inherited from interface InternalIterable
forEachMethods inherited from interface OrderedIterable
getFirstOptional, getLastOptional, indexOf, rejectWithIndex, selectWithIndexMethods inherited from interface ReversibleIterable
asReversed, reverseForEach, reverseForEachWithIndexMethods inherited from interface RichIterable
aggregateBy, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, containsAll, containsAllArguments, containsAllIterable, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, count, countBy, countByEach, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, forEach, getAny, groupBy, groupByAndCollect, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, into, isEmpty, makeString, makeString, makeString, makeString, maxByOptional, maxOptional, maxOptional, minByOptional, minOptional, minOptional, noneSatisfy, noneSatisfyWith, notEmpty, reduce, reduceBy, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectWith, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toBiMap, toImmutableBag, toImmutableBiMap, toImmutableList, toImmutableMap, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSetBy, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toStringMethods inherited from interface Set
add, addAll, clear, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayMethods inherited from interface SortedSet
addFirst, addLast, removeFirst, removeLast, reversed, spliterator
-
Field Details
-
INSTANCE
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
comparator
-
-
Constructor Details
-
ImmutableEmptySortedSet
ImmutableEmptySortedSet() -
ImmutableEmptySortedSet
ImmutableEmptySortedSet(Comparator<? super T> comparator)
-
-
Method Details
-
writeReplace
-
equals
Description copied from interface:SetIterableFollows the same general contract asSet.equals(Object). -
hashCode
public int hashCode()Description copied from interface:SetIterableFollows the same general contract asSet.hashCode(). -
newWith
Description copied from interface:ImmutableCollectionThis method is similar to thewithmethod inMutableCollectionwith the difference that a new copy of this collection with the element appended will be returned.- Specified by:
newWithin interfaceImmutableCollection<T>- Specified by:
newWithin interfaceImmutableSortedSet<T>- Overrides:
newWithin classAbstractImmutableSortedSet<T>
-
newWithAll
Description copied from interface:ImmutableCollectionThis method is similar to thewithAllmethod inMutableCollectionwith the difference that a new copy of this collection with the elements appended will be returned.- Specified by:
newWithAllin interfaceImmutableCollection<T>- Specified by:
newWithAllin interfaceImmutableSortedSet<T>- Overrides:
newWithAllin classAbstractImmutableSortedSet<T>
-
newWithout
Description copied from interface:ImmutableCollectionThis method is similar to thewithoutmethod inMutableCollectionwith the difference that a new copy of this collection with the element removed will be returned.- Specified by:
newWithoutin interfaceImmutableCollection<T>- Specified by:
newWithoutin interfaceImmutableSortedSet<T>- Overrides:
newWithoutin classAbstractImmutableSortedSet<T>
-
newWithoutAll
Description copied from interface:ImmutableCollectionThis method is similar to thewithoutAllmethod inMutableCollectionwith the difference that a new copy of this collection with the elements removed will be returned.- Specified by:
newWithoutAllin interfaceImmutableCollection<T>- Specified by:
newWithoutAllin interfaceImmutableSortedSet<T>- Overrides:
newWithoutAllin classAbstractImmutableSortedSet<T>
-
size
public int size()Description copied from interface:RichIterableReturns the number of items in this iterable.- Specified by:
sizein interfaceCollection<T>- Specified by:
sizein interfaceRichIterable<T>- Specified by:
sizein interfaceSet<T>
-
contains
Description copied from interface:RichIterableReturns true if the iterable has an element which responds true to element.equals(object).- Specified by:
containsin interfaceCollection<T>- Specified by:
containsin interfaceRichIterable<T>- Specified by:
containsin interfaceSet<T>- Overrides:
containsin classAbstractRichIterable<T>
-
tap
Description copied from interface:RichIterableExecutes the Procedure for each element in the iterable and returnsthis.Example using a Java 8 lambda expression:
RichIterable<Person> tapped = people.tap(person -> LOGGER.info(person.getName()));- Specified by:
tapin interfaceImmutableCollection<T>- Specified by:
tapin interfaceImmutableSetIterable<T>- Specified by:
tapin interfaceImmutableSortedSet<T>- Specified by:
tapin interfaceOrderedIterable<T>- Specified by:
tapin interfaceReversibleIterable<T>- Specified by:
tapin interfaceRichIterable<T>- Specified by:
tapin interfaceSetIterable<T>- Specified by:
tapin interfaceSortedIterable<T>- Specified by:
tapin interfaceSortedSetIterable<T>- Overrides:
tapin classAbstractImmutableSortedSet<T>- See Also:
-
each
Description copied from interface:RichIterableThe procedure is executed for each element in the iterable.Example using a Java 8 lambda expression:
people.each(person -> LOGGER.info(person.getName()));
This method is a variant ofInternalIterable.forEach(Procedure)that has a signature conflict withIterable.forEach(java.util.function.Consumer).- Specified by:
eachin interfaceRichIterable<T>- See Also:
-
forEach
Description copied from interface:OrderedIterableIterates over the section of the iterable covered by the specified inclusive indexes. The indexes are both inclusive.e.g. OrderedIterable<Person> people = FastList.newListWith(ted, mary, bob, sally) people.forEach(0, 1, person -> LOGGER.info(person.getName()));
This code would output ted and mary's names.
- Specified by:
forEachin interfaceOrderedIterable<T>
-
forEachWithIndex
Description copied from interface:InternalIterableIterates over the iterable passing each element and the current relative int index to the specified instance of ObjectIntProcedure.Example using a Java 8 lambda:
people.forEachWithIndex((Person person, int index) -> LOGGER.info("Index: " + index + " person: " + person.getName()));Example using an anonymous inner class:
people.forEachWithIndex(new ObjectIntProcedure<Person>() { public void value(Person person, int index) { LOGGER.info("Index: " + index + " person: " + person.getName()); } });- Specified by:
forEachWithIndexin interfaceInternalIterable<T>- Specified by:
forEachWithIndexin interfaceOrderedIterable<T>- Overrides:
forEachWithIndexin classAbstractRichIterable<T>
-
forEachWithIndex
public void forEachWithIndex(int fromIndex, int toIndex, ObjectIntProcedure<? super T> objectIntProcedure) Description copied from interface:OrderedIterableIterates over the section of the iterable covered by the specified inclusive indexes. The indexes are both inclusive.e.g. OrderedIterable<People> people = FastList.newListWith(ted, mary, bob, sally) people.forEachWithIndex(0, 1, (person, index) -> LOGGER.info(person.getName()));
This code would output ted and mary's names.
- Specified by:
forEachWithIndexin interfaceOrderedIterable<T>
-
forEachWith
Description copied from interface:InternalIterableThe procedure2 is evaluated for each element in the iterable with the specified parameter provided as the second argument.Example using a Java 8 lambda:
people.forEachWith((Person person, Person other) -> { if (person.isRelatedTo(other)) { LOGGER.info(person.getName()); } }, fred);Example using an anonymous inner class:
people.forEachWith(new Procedure2<Person, Person>() { public void value(Person person, Person other) { if (person.isRelatedTo(other)) { LOGGER.info(person.getName()); } } }, fred);- Specified by:
forEachWithin interfaceInternalIterable<T>- Overrides:
forEachWithin classAbstractRichIterable<T>
-
select
Description copied from interface:RichIterableReturns all elements of the source collection that return true when evaluating the predicate. This method is also commonly called filter.Example using a Java 8 lambda expression:
RichIterable<Person> selected = people.select(person -> person.getAddress().getCity().equals("London"));- Specified by:
selectin interfaceImmutableCollection<T>- Specified by:
selectin interfaceImmutableSetIterable<T>- Specified by:
selectin interfaceImmutableSortedSet<T>- Specified by:
selectin interfaceOrderedIterable<T>- Specified by:
selectin interfaceReversibleIterable<T>- Specified by:
selectin interfaceRichIterable<T>- Specified by:
selectin interfaceSetIterable<T>- Specified by:
selectin interfaceSortedIterable<T>- Specified by:
selectin interfaceSortedSetIterable<T>- Overrides:
selectin classAbstractImmutableSortedSet<T>
-
selectWith
public <P> ImmutableSortedSet<T> selectWith(Predicate2<? super T, ? super P> predicate, P parameter) Description copied from interface:RichIterableSimilar toRichIterable.select(Predicate), except with an evaluation parameter for the second generic argument inPredicate2.E.g. return a
Collectionof Person elements where the person has an age greater than or equal to 18 yearsExample using a Java 8 lambda expression:
RichIterable<Person> selected = people.selectWith((Person person, Integer age) -> person.getAge()>= age, Integer.valueOf(18));- Specified by:
selectWithin interfaceImmutableCollection<T>- Specified by:
selectWithin interfaceImmutableSetIterable<T>- Specified by:
selectWithin interfaceImmutableSortedSet<T>- Specified by:
selectWithin interfaceOrderedIterable<T>- Specified by:
selectWithin interfaceReversibleIterable<T>- Specified by:
selectWithin interfaceRichIterable<T>- Specified by:
selectWithin interfaceSetIterable<T>- Specified by:
selectWithin interfaceSortedIterable<T>- Specified by:
selectWithin interfaceSortedSetIterable<T>- Overrides:
selectWithin classAbstractImmutableSortedSet<T>- Parameters:
predicate- aPredicate2to use as the select criteriaparameter- a parameter to pass in for evaluation of the second argumentPinpredicate- See Also:
-
reject
Description copied from interface:RichIterableReturns all elements of the source collection that return false when evaluating of the predicate. This method is also sometimes called filterNot and is the equivalent of calling iterable.select(Predicates.not(predicate)).Example using a Java 8 lambda expression:
RichIterable<Person> rejected = people.reject(person -> person.person.getLastName().equals("Smith"));- Specified by:
rejectin interfaceImmutableCollection<T>- Specified by:
rejectin interfaceImmutableSetIterable<T>- Specified by:
rejectin interfaceImmutableSortedSet<T>- Specified by:
rejectin interfaceOrderedIterable<T>- Specified by:
rejectin interfaceReversibleIterable<T>- Specified by:
rejectin interfaceRichIterable<T>- Specified by:
rejectin interfaceSetIterable<T>- Specified by:
rejectin interfaceSortedIterable<T>- Specified by:
rejectin interfaceSortedSetIterable<T>- Overrides:
rejectin classAbstractImmutableSortedSet<T>- Parameters:
predicate- aPredicateto use as the reject criteria- Returns:
- a RichIterable that contains elements that cause
Predicate.accept(Object)method to evaluate to false
-
rejectWith
public <P> ImmutableSortedSet<T> rejectWith(Predicate2<? super T, ? super P> predicate, P parameter) Description copied from interface:RichIterableSimilar toRichIterable.reject(Predicate), except with an evaluation parameter for the second generic argument inPredicate2.E.g. return a
Collectionof Person elements where the person has an age greater than or equal to 18 yearsExample using a Java 8 lambda expression:
RichIterable<Person> rejected = people.rejectWith((Person person, Integer age) -> person.getAge() < age, Integer.valueOf(18));- Specified by:
rejectWithin interfaceImmutableCollection<T>- Specified by:
rejectWithin interfaceImmutableSetIterable<T>- Specified by:
rejectWithin interfaceImmutableSortedSet<T>- Specified by:
rejectWithin interfaceOrderedIterable<T>- Specified by:
rejectWithin interfaceReversibleIterable<T>- Specified by:
rejectWithin interfaceRichIterable<T>- Specified by:
rejectWithin interfaceSetIterable<T>- Specified by:
rejectWithin interfaceSortedIterable<T>- Specified by:
rejectWithin interfaceSortedSetIterable<T>- Overrides:
rejectWithin classAbstractImmutableSortedSet<T>- Parameters:
predicate- aPredicate2to use as the select criteriaparameter- a parameter to pass in for evaluation of the second argumentPinpredicate- See Also:
-
selectInstancesOf
Description copied from interface:RichIterableReturns all elements of the source collection that are instances of the Classclazz.RichIterable<Integer> integers = List.mutable.with(new Integer(0), new Long(0L), new Double(0.0)).selectInstancesOf(Integer.class);- Specified by:
selectInstancesOfin interfaceImmutableCollection<T>- Specified by:
selectInstancesOfin interfaceImmutableSetIterable<T>- Specified by:
selectInstancesOfin interfaceImmutableSortedSet<T>- Specified by:
selectInstancesOfin interfaceOrderedIterable<T>- Specified by:
selectInstancesOfin interfaceReversibleIterable<T>- Specified by:
selectInstancesOfin interfaceRichIterable<T>- Specified by:
selectInstancesOfin interfaceSetIterable<T>- Specified by:
selectInstancesOfin interfaceSortedIterable<T>- Specified by:
selectInstancesOfin interfaceSortedSetIterable<T>- Overrides:
selectInstancesOfin classAbstractImmutableSortedSet<T>
-
collectWithIndex
public <V> ImmutableList<V> collectWithIndex(ObjectIntToObjectFunction<? super T, ? extends V> function) Description copied from interface:OrderedIterableReturns a new OrderedIterable using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndexin interfaceImmutableSortedSet<T>- Specified by:
collectWithIndexin interfaceOrderedIterable<T>- Specified by:
collectWithIndexin interfaceReversibleIterable<T>- Specified by:
collectWithIndexin interfaceSortedSetIterable<T>- Since:
- 9.1.
-
collectWithIndex
public <V, R extends Collection<V>> R collectWithIndex(ObjectIntToObjectFunction<? super T, ? extends V> function, R target) Description copied from interface:OrderedIterableAdds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndexin interfaceOrderedIterable<T>- Since:
- 9.1.
-
iterator
-
min
Description copied from interface:RichIterableReturns the minimum element out of this container based on the comparator.- Specified by:
minin interfaceRichIterable<T>- Overrides:
minin classAbstractRichIterable<T>
-
max
Description copied from interface:RichIterableReturns the maximum element out of this container based on the comparator.- Specified by:
maxin interfaceRichIterable<T>- Overrides:
maxin classAbstractRichIterable<T>
-
min
Description copied from interface:RichIterableReturns the minimum element out of this container based on the natural order.- Specified by:
minin interfaceOrderedIterable<T>- Specified by:
minin interfaceRichIterable<T>- Specified by:
minin interfaceSortedIterable<T>- Overrides:
minin classAbstractRichIterable<T>
-
max
Description copied from interface:RichIterableReturns the maximum element out of this container based on the natural order.- Specified by:
maxin interfaceOrderedIterable<T>- Specified by:
maxin interfaceRichIterable<T>- Specified by:
maxin interfaceSortedIterable<T>- Overrides:
maxin classAbstractRichIterable<T>
-
minBy
Description copied from interface:RichIterableReturns the minimum elements out of this container based on the natural order of the attribute returned by Function.- Specified by:
minByin interfaceRichIterable<T>- Overrides:
minByin classAbstractRichIterable<T>
-
maxBy
Description copied from interface:RichIterableReturns the maximum elements out of this container based on the natural order of the attribute returned by Function.- Specified by:
maxByin interfaceRichIterable<T>- Overrides:
maxByin classAbstractRichIterable<T>
-
zip
Description copied from interface:RichIterableSame asRichIterable.zip(Iterable)but usestargetfor output.- Specified by:
zipin interfaceOrderedIterable<T>- Specified by:
zipin interfaceRichIterable<T>- Overrides:
zipin classAbstractRichIterable<T>
-
zipWithIndex
Description copied from interface:RichIterableSame asRichIterable.zipWithIndex()but usestargetfor output.- Specified by:
zipWithIndexin interfaceOrderedIterable<T>- Specified by:
zipWithIndexin interfaceRichIterable<T>- Overrides:
zipWithIndexin classAbstractRichIterable<T>
-
toStack
Description copied from interface:OrderedIterableConverts the OrderedIterable to a mutable MutableStack implementation.- Specified by:
toStackin interfaceOrderedIterable<T>- Overrides:
toStackin classAbstractImmutableSortedSet<T>
-
first
-
last
-
comparator
Description copied from interface:SortedSetIterableReturns the comparator used to order the elements in this set, or null if this set uses the natural ordering of its elements.- Specified by:
comparatorin interfaceSortedIterable<T>- Specified by:
comparatorin interfaceSortedSet<T>- Specified by:
comparatorin interfaceSortedSetIterable<T>
-
compareTo
- Specified by:
compareToin interfaceComparable<T>
-
take
Description copied from interface:ReversibleIterableReturns the firstcountelements of the iterable or all the elements in the iterable ifcountis greater than the length of the iterable.- Specified by:
takein interfaceImmutableSortedSet<T>- Specified by:
takein interfaceReversibleIterable<T>- Specified by:
takein interfaceSortedSetIterable<T>- Parameters:
count- the number of items to take.
-
drop
Description copied from interface:ReversibleIterableReturns an iterable after skipping the firstcountelements or an empty iterable if thecountis greater than the length of the iterable.- Specified by:
dropin interfaceImmutableSortedSet<T>- Specified by:
dropin interfaceReversibleIterable<T>- Specified by:
dropin interfaceSortedSetIterable<T>- Parameters:
count- the number of items to drop.
-
getOnly
Description copied from interface:RichIterableReturns the element if the iterable has exactly one element. Otherwise, throwIllegalStateException.- Specified by:
getOnlyin interfaceRichIterable<T>- Returns:
- an element of an iterable.
-