Top Inners Fields Constructors Methods
org.eclipse.collections.impl.set.sorted.immutable

pack-priv final Class ImmutableTreeSet<T>

extends AbstractImmutableSortedSet<T>
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.io.Serializable, java.util.Arrays, .Comparator, .ConcurrentModificationException, .Iterator, .Set, .SortedSet, java.util.concurrent.ExecutorService, org.eclipse.collections.api.LazyIterable, org.eclipse.collections.api.block.function.Function, org.eclipse.collections.api.block.function.primitive.ObjectIntToObjectFunction, org.eclipse.collections.api.block.predicate.Predicate, .Predicate2, org.eclipse.collections.api.block.procedure.Procedure, org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure, org.eclipse.collections.api.factory.SortedSets, org.eclipse.collections.api.list.ImmutableList, .MutableList, org.eclipse.collections.api.map.MapIterable, org.eclipse.collections.api.multimap.sortedset.ImmutableSortedSetMultimap, org.eclipse.collections.api.ordered.OrderedIterable, org.eclipse.collections.api.set.sorted.ImmutableSortedSet, .MutableSortedSet, .ParallelSortedSetIterable, .SortedSetIterable, org.eclipse.collections.impl.lazy.AbstractLazyIterable, org.eclipse.collections.impl.lazy.parallel.AbstractBatch, .AbstractParallelIterable, org.eclipse.collections.impl.lazy.parallel.list.ListBatch, org.eclipse.collections.impl.lazy.parallel.set.sorted.AbstractParallelSortedSetIterable, .CollectSortedSetBatch, .FlatCollectSortedSetBatch, .RootSortedSetBatch, .SelectSortedSetBatch, .SortedSetBatch, org.eclipse.collections.impl.list.mutable.FastList, org.eclipse.collections.impl.map.mutable.ConcurrentHashMap, org.eclipse.collections.impl.utility.ArrayIterate, .Iterate, .ListIterate, org.eclipse.collections.impl.utility.internal.InternalArrayIterate

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class

Field Summary

Modifier and TypeField and Description
private final Comparator<? super T>
private final T[]
private static final long

Constructor Summary

AccessConstructor and Description
private
ImmutableTreeSet(T[] input, Comparator<? super T> inputComparator, boolean isSortedAndUnique)

Method Summary

Modifier and TypeMethod and Description
public ParallelSortedSetIterable<T>
public <V> ImmutableList<V>
collectWithIndex(ObjectIntToObjectFunction<? super T, ? extends V> function)

Overrides default org.eclipse.collections.api.set.sorted.ImmutableSortedSet.collectWithIndex.

Returns a new OrderedIterable using results obtained by applying the specified function to each element and its corresponding index.

public Comparator<? super T>
comparator()

Implements org.eclipse.collections.api.set.sorted.SortedSetIterable.comparator, java.util.SortedSet.comparator.

Returns the comparator used to order the elements in this set, or null if this set uses the natural ordering of its elements.

private int
compare(T o1, T o2)

public int
compareTo(SortedSetIterable<T> otherSet)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.

public boolean
contains(Object object)

Overrides org.eclipse.collections.impl.AbstractRichIterable.contains.

Implements org.eclipse.collections.api.RichIterable.contains, java.util.Set.contains, java.util.Collection.contains.

Returns true if the iterable has an element which responds true to element.equals(object).

public <S> boolean
corresponds(OrderedIterable<S> other, Predicate2<? super T, ? super S> predicate)

Overrides org.eclipse.collections.impl.set.sorted.immutable.AbstractImmutableSortedSet.corresponds.

Implements org.eclipse.collections.api.ordered.OrderedIterable.corresponds.

Returns true if both OrderedIterables have the same length and predicate returns true for all corresponding elements e1 of this OrderedIterable and e2 of other.

public int
detectIndex(Predicate<? super T> predicate)

Overrides org.eclipse.collections.impl.set.sorted.immutable.AbstractImmutableSortedSet.detectIndex.

Implements org.eclipse.collections.api.ordered.OrderedIterable.detectIndex.

Returns the index of the first element of the OrderedIterable for which the predicate evaluates to true.

public ImmutableSortedSet<T>
drop(int count)

Implements org.eclipse.collections.api.set.sorted.ImmutableSortedSet.drop.

Returns an iterable after skipping the first count elements or an empty iterable if the count is greater than the length of the iterable.

public void
each(Procedure<? super T> procedure)

Implements org.eclipse.collections.api.RichIterable.each.

The procedure is executed for each element in the iterable.

public boolean
public T
first()

Implements java.util.SortedSet.first.

Returns the first (lowest) element currently in this set.

public void
forEach(int fromIndex, int toIndex, Procedure<? super T> procedure)

Implements org.eclipse.collections.api.ordered.OrderedIterable.forEach.

Iterates over the section of the iterable covered by the specified inclusive indexes.

public void
forEachWithIndex(int fromIndex, int toIndex, ObjectIntProcedure<? super T> objectIntProcedure)

Implements org.eclipse.collections.api.ordered.OrderedIterable.forEachWithIndex.

Iterates over the section of the iterable covered by the specified inclusive indexes.

public int
public int
indexOf(Object object)

Overrides default org.eclipse.collections.api.ordered.OrderedIterable.indexOf.

Returns the index of the first occurrence of the specified item in this iterable, or -1 if this iterable does not contain the item.

public Iterator<T>
iterator()

Implements java.lang.Iterable.iterator, java.util.Set.iterator, java.util.Collection.iterator.

Returns an iterator over elements of type T.

public T
last()

Implements java.util.SortedSet.last.

Returns the last (highest) element currently in this set.

public static <T> ImmutableSortedSet<T>
newSet(SortedSet<? super T> set)

public static <T> ImmutableSortedSet<T>
newSetFromIterable(Iterable<? extends T> iterable)

public static <T> ImmutableSortedSet<T>
newSetFromIterable(Comparator<? super T> comparator, Iterable<? extends T> iterable)

public static <T> ImmutableSortedSet<T>
newSetWith(T... elements)

public static <T> ImmutableSortedSet<T>
newSetWith(Comparator<? super T> comparator, T... elements)

public int
size()

Implements org.eclipse.collections.api.RichIterable.size, java.util.Set.size, java.util.Collection.size.

Returns the number of items in this iterable.

public ImmutableSortedSet<T>
take(int count)

Implements org.eclipse.collections.api.set.sorted.ImmutableSortedSet.take.

Returns the first count elements of the iterable or all the elements in the iterable if count is greater than the length of the iterable.

private Object
Inherited from org.eclipse.collections.impl.set.sorted.immutable.AbstractImmutableSortedSet:
cartesianProductcastToSortedSetcollectcollectBooleancollectBytecollectCharcollectDoublecollectFloatcollectIfcollectIntcollectLongcollectShortcollectWithdetectLastIndexdifferencedifferenceIntodistinctdropWhileflatCollectgetFirstgetLastgroupBygroupByEachheadSetintersectintersectIntoisProperSubsetOfisSubsetOfnewMutablenewWithnewWithAllnewWithoutnewWithoutAllpartitionpartitionWhilepartitionWithpowerSetrejectrejectWithselectselectInstancesOfselectWithsubSetsymmetricDifferencesymmetricDifferenceIntotailSettakeWhiletaptoImmutabletoReversedtoStackunionunionIntozipzipWithIndex