private final class ImmutableRangeSet.AsSet extends ImmutableSortedSet<C>
ImmutableSortedSet.Builder<E>
ImmutableCollection.ArrayBasedBuilder<E>
Modifier and Type | Field and Description |
---|---|
private DiscreteDomain<C> |
domain |
private java.lang.Integer |
size |
comparator, descendingSet
MAX_TABLE_SIZE
Constructor and Description |
---|
AsSet(DiscreteDomain<C> domain) |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(java.lang.Object o) |
UnmodifiableIterator<C> |
descendingIterator() |
(package private) ImmutableSortedSet<C> |
headSetImpl(C toElement,
boolean inclusive) |
(package private) int |
indexOf(java.lang.Object target)
Returns the position of an element within the set, or -1 if not present.
|
(package private) boolean |
isPartialView()
Returns
true if this immutable collection's implementation contains references to
user-created objects that aren't accessible via this collection's methods. |
UnmodifiableIterator<C> |
iterator()
Returns an unmodifiable iterator across the elements in this collection.
|
int |
size() |
(package private) ImmutableSortedSet<C> |
subSet(Range<C> range) |
(package private) ImmutableSortedSet<C> |
subSetImpl(C fromElement,
boolean fromInclusive,
C toElement,
boolean toInclusive) |
(package private) ImmutableSortedSet<C> |
tailSetImpl(C fromElement,
boolean inclusive) |
java.lang.String |
toString() |
(package private) java.lang.Object |
writeReplace() |
ceiling, comparator, construct, copyOf, copyOf, copyOf, copyOf, copyOf, copyOf, copyOf, copyOfSorted, createDescendingSet, descendingSet, emptySet, first, floor, headSet, headSet, higher, last, lower, naturalOrder, of, of, of, of, of, of, of, orderedBy, pollFirst, pollLast, reverseOrder, subSet, subSet, tailSet, tailSet, unsafeCompare, unsafeCompare
builder
chooseTableSize, equals, hashCode, isHashCodeFast
add, addAll, asList, clear, copyIntoArray, createAsList, remove, removeAll, retainAll, toArray, toArray
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
private final DiscreteDomain<C extends java.lang.Comparable> domain
private transient java.lang.Integer size
AsSet(DiscreteDomain<C> domain)
public int size()
public UnmodifiableIterator<C> iterator()
ImmutableCollection
iterator
in interface SortedIterable<C extends java.lang.Comparable>
iterator
in interface java.lang.Iterable<C extends java.lang.Comparable>
iterator
in interface java.util.Collection<C extends java.lang.Comparable>
iterator
in interface java.util.NavigableSet<C extends java.lang.Comparable>
iterator
in interface java.util.Set<C extends java.lang.Comparable>
iterator
in class ImmutableSortedSet<C extends java.lang.Comparable>
@GwtIncompatible(value="NavigableSet") public UnmodifiableIterator<C> descendingIterator()
descendingIterator
in interface java.util.NavigableSet<C extends java.lang.Comparable>
descendingIterator
in class ImmutableSortedSet<C extends java.lang.Comparable>
ImmutableSortedSet<C> subSet(Range<C> range)
ImmutableSortedSet<C> headSetImpl(C toElement, boolean inclusive)
headSetImpl
in class ImmutableSortedSet<C extends java.lang.Comparable>
ImmutableSortedSet<C> subSetImpl(C fromElement, boolean fromInclusive, C toElement, boolean toInclusive)
subSetImpl
in class ImmutableSortedSet<C extends java.lang.Comparable>
ImmutableSortedSet<C> tailSetImpl(C fromElement, boolean inclusive)
tailSetImpl
in class ImmutableSortedSet<C extends java.lang.Comparable>
public boolean contains(@Nullable java.lang.Object o)
contains
in interface java.util.Collection<C extends java.lang.Comparable>
contains
in interface java.util.Set<C extends java.lang.Comparable>
contains
in class ImmutableCollection<C extends java.lang.Comparable>
int indexOf(java.lang.Object target)
ImmutableSortedSet
indexOf
in class ImmutableSortedSet<C extends java.lang.Comparable>
boolean isPartialView()
ImmutableCollection
true
if this immutable collection's implementation contains references to
user-created objects that aren't accessible via this collection's methods. This is generally
used to determine whether copyOf
implementations should make an explicit copy to avoid
memory leaks.isPartialView
in class ImmutableCollection<C extends java.lang.Comparable>
public java.lang.String toString()
toString
in class java.util.AbstractCollection<C extends java.lang.Comparable>
java.lang.Object writeReplace()
writeReplace
in class ImmutableSortedSet<C extends java.lang.Comparable>