Package com.google.common.collect
Class ImmutableMapKeySet<K,V>
java.lang.Object
java.util.AbstractCollection<K>
com.google.common.collect.ImmutableCollection<K>
com.google.common.collect.ImmutableSet<K>
com.google.common.collect.ImmutableSet.CachingAsList<K>
com.google.common.collect.IndexedImmutableSet<K>
com.google.common.collect.ImmutableMapKeySet<K,V>
- All Implemented Interfaces:
Serializable,Iterable<K>,Collection<K>,Set<K>
keySet() implementation for ImmutableMap.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.google.common.collect.ImmutableSet
ImmutableSet.Builder<E>, ImmutableSet.CachingAsList<E>, ImmutableSet.Indexed<E> -
Field Summary
FieldsFields inherited from class com.google.common.collect.ImmutableSet
MAX_TABLE_SIZE, SPLITERATOR_CHARACTERISTICS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoid(package private) Kget(int index) (package private) booleanReturnstrueif 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.intsize()(package private) ObjectMethods inherited from class com.google.common.collect.IndexedImmutableSet
copyIntoArray, createAsListMethods inherited from class com.google.common.collect.ImmutableSet.CachingAsList
asListMethods inherited from class com.google.common.collect.ImmutableSet
builder, builderWithExpectedSize, chooseTableSize, copyOf, copyOf, copyOf, copyOf, equals, hashCode, isHashCodeFast, of, of, of, of, of, of, of, toImmutableSetMethods inherited from class com.google.common.collect.ImmutableCollection
add, addAll, clear, internalArray, internalArrayEnd, internalArrayStart, remove, removeAll, removeIf, retainAll, toArray, toArrayMethods inherited from class java.util.AbstractCollection
containsAll, isEmpty, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Field Details
-
map
-
-
Constructor Details
-
ImmutableMapKeySet
ImmutableMapKeySet(ImmutableMap<K, V> map)
-
-
Method Details
-
size
public int size()- Specified by:
sizein interfaceCollection<K>- Specified by:
sizein interfaceSet<K>- Specified by:
sizein classAbstractCollection<K>
-
iterator
Description copied from class:ImmutableCollectionReturns an unmodifiable iterator across the elements in this collection. -
spliterator
- Specified by:
spliteratorin interfaceCollection<K>- Specified by:
spliteratorin interfaceIterable<K>- Specified by:
spliteratorin interfaceSet<K>- Overrides:
spliteratorin classIndexedImmutableSet<K>
-
contains
- Specified by:
containsin interfaceCollection<K>- Specified by:
containsin interfaceSet<K>- Specified by:
containsin classImmutableCollection<K>
-
get
- Specified by:
getin classIndexedImmutableSet<K>
-
forEach
-
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<K>
-
writeReplace
Object writeReplace()- Overrides:
writeReplacein classIndexedImmutableSet<K>
-