Package com.google.common.collect
Class ImmutableRangeSet.AsSet
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- com.google.common.collect.ImmutableCollection<E>
-
- com.google.common.collect.ImmutableSet<E>
-
- com.google.common.collect.ImmutableSortedSetFauxverideShim<E>
-
- com.google.common.collect.ImmutableSortedSet<C>
-
- com.google.common.collect.ImmutableRangeSet.AsSet
-
- All Implemented Interfaces:
SortedIterable<C>
,java.io.Serializable
,java.lang.Iterable<C>
,java.util.Collection<C>
,java.util.NavigableSet<C>
,java.util.Set<C>
,java.util.SortedSet<C>
- Enclosing class:
- ImmutableRangeSet<C extends java.lang.Comparable>
private final class ImmutableRangeSet.AsSet extends ImmutableSortedSet<C>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.collect.ImmutableSortedSet
ImmutableSortedSet.Builder<E>
-
Nested classes/interfaces inherited from class com.google.common.collect.ImmutableSet
ImmutableSet.Indexed<E>
-
-
Field Summary
Fields Modifier and Type Field Description private DiscreteDomain<C>
domain
private java.lang.Integer
size
-
Fields inherited from class com.google.common.collect.ImmutableSortedSet
comparator, descendingSet, SPLITERATOR_CHARACTERISTICS
-
Fields inherited from class com.google.common.collect.ImmutableSet
HASH_FLOODING_FPP, MAX_RUN_MULTIPLIER, MAX_TABLE_SIZE
-
-
Constructor Summary
Constructors Constructor Description AsSet(DiscreteDomain<C> domain)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(java.lang.Object o)
(package private) ImmutableSortedSet<C>
createDescendingSet()
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()
Returnstrue
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()
-
Methods inherited from class com.google.common.collect.ImmutableSortedSet
ceiling, comparator, construct, copyOf, copyOf, copyOf, copyOf, copyOf, copyOf, copyOf, copyOfSorted, descendingSet, emptySet, first, floor, headSet, headSet, higher, last, lower, naturalOrder, of, of, of, of, of, of, of, orderedBy, pollFirst, pollLast, reverseOrder, spliterator, subSet, subSet, tailSet, tailSet, toImmutableSortedSet, unsafeCompare, unsafeCompare
-
Methods inherited from class com.google.common.collect.ImmutableSortedSetFauxverideShim
builder, builderWithExpectedSize, copyOf, of, of, of, of, of, of, toImmutableSet
-
Methods inherited from class com.google.common.collect.ImmutableSet
asList, chooseTableSize, createAsList, equals, hashCode, hashFloodingDetected, isHashCodeFast, maxRunBeforeFallback, rebuildHashTable
-
Methods inherited from class com.google.common.collect.ImmutableCollection
add, addAll, clear, copyIntoArray, remove, removeAll, removeIf, retainAll, toArray, toArray
-
-
-
-
Field Detail
-
domain
private final DiscreteDomain<C extends java.lang.Comparable> domain
-
size
private transient java.lang.Integer size
-
-
Constructor Detail
-
AsSet
AsSet(DiscreteDomain<C> domain)
-
-
Method Detail
-
size
public int size()
-
iterator
public UnmodifiableIterator<C> iterator()
Description copied from class:ImmutableCollection
Returns an unmodifiable iterator across the elements in this collection.- Specified by:
iterator
in interfacejava.util.Collection<C extends java.lang.Comparable>
- Specified by:
iterator
in interfacejava.lang.Iterable<C extends java.lang.Comparable>
- Specified by:
iterator
in interfacejava.util.NavigableSet<C extends java.lang.Comparable>
- Specified by:
iterator
in interfacejava.util.Set<C extends java.lang.Comparable>
- Specified by:
iterator
in interfaceSortedIterable<C extends java.lang.Comparable>
- Specified by:
iterator
in classImmutableSortedSet<C extends java.lang.Comparable>
-
descendingIterator
@GwtIncompatible("NavigableSet") public UnmodifiableIterator<C> descendingIterator()
- Specified by:
descendingIterator
in interfacejava.util.NavigableSet<C extends java.lang.Comparable>
- Specified by:
descendingIterator
in classImmutableSortedSet<C extends java.lang.Comparable>
-
subSet
ImmutableSortedSet<C> subSet(Range<C> range)
-
headSetImpl
ImmutableSortedSet<C> headSetImpl(C toElement, boolean inclusive)
- Specified by:
headSetImpl
in classImmutableSortedSet<C extends java.lang.Comparable>
-
subSetImpl
ImmutableSortedSet<C> subSetImpl(C fromElement, boolean fromInclusive, C toElement, boolean toInclusive)
- Specified by:
subSetImpl
in classImmutableSortedSet<C extends java.lang.Comparable>
-
tailSetImpl
ImmutableSortedSet<C> tailSetImpl(C fromElement, boolean inclusive)
- Specified by:
tailSetImpl
in classImmutableSortedSet<C extends java.lang.Comparable>
-
contains
public boolean contains(java.lang.Object o)
- Specified by:
contains
in interfacejava.util.Collection<C extends java.lang.Comparable>
- Specified by:
contains
in interfacejava.util.Set<C extends java.lang.Comparable>
- Specified by:
contains
in classImmutableCollection<C extends java.lang.Comparable>
-
indexOf
int indexOf(java.lang.Object target)
Description copied from class:ImmutableSortedSet
Returns the position of an element within the set, or -1 if not present.- Specified by:
indexOf
in classImmutableSortedSet<C extends java.lang.Comparable>
-
createDescendingSet
ImmutableSortedSet<C> createDescendingSet()
- Specified by:
createDescendingSet
in classImmutableSortedSet<C extends java.lang.Comparable>
-
isPartialView
boolean isPartialView()
Description copied from class:ImmutableCollection
Returnstrue
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 whethercopyOf
implementations should make an explicit copy to avoid memory leaks.- Specified by:
isPartialView
in classImmutableCollection<C extends java.lang.Comparable>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.util.AbstractCollection<C extends java.lang.Comparable>
-
writeReplace
java.lang.Object writeReplace()
- Overrides:
writeReplace
in classImmutableSortedSet<C extends java.lang.Comparable>
-
-