Package com.google.common.collect
Class ImmutableRangeSet.AsSet
java.lang.Object
java.util.AbstractCollection<C>
com.google.common.collect.ImmutableCollection<C>
com.google.common.collect.ImmutableSet<C>
com.google.common.collect.ImmutableSet.CachingAsList<C>
com.google.common.collect.ImmutableSortedSet<C>
com.google.common.collect.ImmutableRangeSet.AsSet
- All Implemented Interfaces:
SortedIterable<C>
,Serializable
,Iterable<C>
,Collection<C>
,NavigableSet<C>
,SequencedCollection<C>
,SequencedSet<C>
,Set<C>
,SortedSet<C>
- Enclosing class:
ImmutableRangeSet<C extends Comparable>
-
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.CachingAsList<E>, ImmutableSet.Indexed<E>
-
Field Summary
FieldsFields inherited from class com.google.common.collect.ImmutableSortedSet
comparator, descendingSet, SPLITERATOR_CHARACTERISTICS
Fields inherited from class com.google.common.collect.ImmutableSet
MAX_TABLE_SIZE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
(package private) ImmutableSortedSet
<C> (package private) ImmutableSortedSet
<C> headSetImpl
(C toElement, boolean inclusive) (package private) int
Returns the position of an element within the set, or -1 if not present.(package private) boolean
Returnstrue
if this immutable collection's implementation contains references to user-created objects that aren't accessible via this collection's methods.iterator()
Returns an unmodifiable iterator across the elements in this collection.private void
readObject
(ObjectInputStream stream) int
size()
(package private) ImmutableSortedSet
<C> (package private) ImmutableSortedSet
<C> subSetImpl
(C fromElement, boolean fromInclusive, C toElement, boolean toInclusive) (package private) ImmutableSortedSet
<C> tailSetImpl
(C fromElement, boolean inclusive) toString()
(package private) Object
Methods inherited from class com.google.common.collect.ImmutableSortedSet
builder, builderWithExpectedSize, ceiling, comparator, construct, copyOf, 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, toImmutableSet, toImmutableSortedSet, unsafeCompare, unsafeCompare
Methods inherited from class com.google.common.collect.ImmutableSet.CachingAsList
asList, createAsList
Methods inherited from class com.google.common.collect.ImmutableSet
chooseTableSize, equals, hashCode, isHashCodeFast
Methods inherited from class com.google.common.collect.ImmutableCollection
add, addAll, clear, copyIntoArray, internalArray, internalArrayEnd, internalArrayStart, remove, removeAll, removeIf, retainAll, toArray, toArray
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.NavigableSet
removeFirst, removeLast, reversed
-
Field Details
-
domain
-
size
-
-
Constructor Details
-
AsSet
AsSet(DiscreteDomain<C> domain)
-
-
Method Details
-
size
public int size()- Specified by:
size
in interfaceCollection<C extends Comparable>
- Specified by:
size
in interfaceSet<C extends Comparable>
- Specified by:
size
in classAbstractCollection<C extends Comparable>
-
iterator
Description copied from class:ImmutableCollection
Returns an unmodifiable iterator across the elements in this collection.- Specified by:
iterator
in interfaceCollection<C extends Comparable>
- Specified by:
iterator
in interfaceIterable<C extends Comparable>
- Specified by:
iterator
in interfaceNavigableSet<C extends Comparable>
- Specified by:
iterator
in interfaceSet<C extends Comparable>
- Specified by:
iterator
in interfaceSortedIterable<C extends Comparable>
- Specified by:
iterator
in classImmutableSortedSet<C extends Comparable>
-
descendingIterator
- Specified by:
descendingIterator
in interfaceNavigableSet<C extends Comparable>
- Specified by:
descendingIterator
in classImmutableSortedSet<C extends Comparable>
-
subSet
-
headSetImpl
- Specified by:
headSetImpl
in classImmutableSortedSet<C extends Comparable>
-
subSetImpl
ImmutableSortedSet<C> subSetImpl(C fromElement, boolean fromInclusive, C toElement, boolean toInclusive) - Specified by:
subSetImpl
in classImmutableSortedSet<C extends Comparable>
-
tailSetImpl
- Specified by:
tailSetImpl
in classImmutableSortedSet<C extends Comparable>
-
contains
- Specified by:
contains
in interfaceCollection<C extends Comparable>
- Specified by:
contains
in interfaceSet<C extends Comparable>
- Specified by:
contains
in classImmutableCollection<C extends Comparable>
-
indexOf
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 Comparable>
-
createDescendingSet
ImmutableSortedSet<C> createDescendingSet()- Specified by:
createDescendingSet
in classImmutableSortedSet<C extends 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 Comparable>
-
toString
- Overrides:
toString
in classAbstractCollection<C extends Comparable>
-
writeReplace
Object writeReplace()- Overrides:
writeReplace
in classImmutableSortedSet<C extends Comparable>
-
readObject
- Throws:
InvalidObjectException
-