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>domainprivate java.lang.Integersize-
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 booleancontains(java.lang.Object o)(package private) ImmutableSortedSet<C>createDescendingSet()UnmodifiableIterator<C>descendingIterator()(package private) ImmutableSortedSet<C>headSetImpl(C toElement, boolean inclusive)(package private) intindexOf(java.lang.Object target)Returns the position of an element within the set, or -1 if not present.(package private) booleanisPartialView()Returnstrueif 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.intsize()(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.StringtoString()(package private) java.lang.ObjectwriteReplace()-
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, rebuildHashTable
-
Methods inherited from class com.google.common.collect.ImmutableCollection
add, addAll, clear, copyIntoArray, internalArray, internalArrayEnd, internalArrayStart, 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:ImmutableCollectionReturns an unmodifiable iterator across the elements in this collection.- Specified by:
iteratorin interfacejava.util.Collection<C extends java.lang.Comparable>- Specified by:
iteratorin interfacejava.lang.Iterable<C extends java.lang.Comparable>- Specified by:
iteratorin interfacejava.util.NavigableSet<C extends java.lang.Comparable>- Specified by:
iteratorin interfacejava.util.Set<C extends java.lang.Comparable>- Specified by:
iteratorin interfaceSortedIterable<C extends java.lang.Comparable>- Specified by:
iteratorin classImmutableSortedSet<C extends java.lang.Comparable>
-
descendingIterator
public UnmodifiableIterator<C> descendingIterator()
- Specified by:
descendingIteratorin interfacejava.util.NavigableSet<C extends java.lang.Comparable>- Specified by:
descendingIteratorin classImmutableSortedSet<C extends java.lang.Comparable>
-
subSet
ImmutableSortedSet<C> subSet(Range<C> range)
-
headSetImpl
ImmutableSortedSet<C> headSetImpl(C toElement, boolean inclusive)
- Specified by:
headSetImplin classImmutableSortedSet<C extends java.lang.Comparable>
-
subSetImpl
ImmutableSortedSet<C> subSetImpl(C fromElement, boolean fromInclusive, C toElement, boolean toInclusive)
- Specified by:
subSetImplin classImmutableSortedSet<C extends java.lang.Comparable>
-
tailSetImpl
ImmutableSortedSet<C> tailSetImpl(C fromElement, boolean inclusive)
- Specified by:
tailSetImplin classImmutableSortedSet<C extends java.lang.Comparable>
-
contains
public boolean contains(java.lang.Object o)
- Specified by:
containsin interfacejava.util.Collection<C extends java.lang.Comparable>- Specified by:
containsin interfacejava.util.Set<C extends java.lang.Comparable>- Specified by:
containsin classImmutableCollection<C extends java.lang.Comparable>
-
indexOf
int indexOf(java.lang.Object target)
Description copied from class:ImmutableSortedSetReturns the position of an element within the set, or -1 if not present.- Specified by:
indexOfin classImmutableSortedSet<C extends java.lang.Comparable>
-
createDescendingSet
ImmutableSortedSet<C> createDescendingSet()
- Specified by:
createDescendingSetin classImmutableSortedSet<C extends java.lang.Comparable>
-
isPartialView
boolean isPartialView()
Description copied from class:ImmutableCollectionReturnstrueif 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 whethercopyOfimplementations should make an explicit copy to avoid memory leaks.- Specified by:
isPartialViewin classImmutableCollection<C extends java.lang.Comparable>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.util.AbstractCollection<C extends java.lang.Comparable>
-
writeReplace
java.lang.Object writeReplace()
- Overrides:
writeReplacein classImmutableSortedSet<C extends java.lang.Comparable>
-
-