Top Description Fields Constructors Methods
com.google.common.collect

pack-priv final Class JdkBackedImmutableSet<E>

extends IndexedImmutableSet<E>
Class Inheritance
Annotations
@GwtCompatible
serializable:true
@ElementTypesAreNonnullByDefault
Imports
com.google.common.annotations.GwtCompatible, .GwtIncompatible, .J2ktIncompatible, java.util.Set, javax.annotation.CheckForNull

ImmutableSet implementation backed by a JDK HashSet, used to defend against apparent hash flooding. This implementation is never used on the GWT client side, but it must be present there for serialization to work.
Author
Louis Wasserman

Field Summary

Modifier and TypeField and Description
private final Set<?>
private final ImmutableList<E>

Constructor Summary

AccessConstructor and Description
pack-priv
JdkBackedImmutableSet(Set<?> delegate, ImmutableList<E> delegateList)

Method Summary

Modifier and TypeMethod and Description
public boolean
contains(Object
element whose presence in this set is to be tested
object
)

Implements abstract com.google.common.collect.ImmutableCollection.contains.

Implements java.util.Set.contains, java.util.Collection.contains.

Returns true if this set contains the specified element.
pack-priv E
pack-priv boolean
isPartialView()

Implements abstract com.google.common.collect.ImmutableCollection.isPartialView.

Returns true if this immutable collection's implementation contains references to user-created objects that aren't accessible via this collection's methods.
public int
size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.Set.size, java.util.Collection.size.

Returns the number of elements in this set (its cardinality).
pack-priv Object
Inherited from com.google.common.collect.IndexedImmutableSet:
copyIntoArraycreateAsListforEachiteratorspliterator

Field Detail

delegateback to summary
private final Set<?> delegate
delegateListback to summary
private final ImmutableList<E> delegateList

Constructor Detail

JdkBackedImmutableSetback to summary
pack-priv JdkBackedImmutableSet(Set<?> delegate, ImmutableList<E> delegateList)

Method Detail

containsback to summary
public boolean contains(Object object)

Implements abstract com.google.common.collect.ImmutableCollection.contains.

Implements java.util.Set.contains, java.util.Collection.contains.

Doc from java.util.Set.contains.

Returns true if this set contains the specified element. More formally, returns true if and only if this set contains an element e such that Objects.equals(o, e).

Parameters
object:Object

element whose presence in this set is to be tested

Returns:boolean

true if this set contains the specified element

Annotations
@Override
getback to summary
pack-priv E get(int index)

Implements abstract com.google.common.collect.IndexedImmutableSet.get.

Annotations
@Override
isPartialViewback to summary
pack-priv boolean isPartialView()

Implements abstract com.google.common.collect.ImmutableCollection.isPartialView.

Doc from com.google.common.collect.ImmutableCollection.isPartialView.

Returns 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.

Annotations
@Override
sizeback to summary
public int size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.Set.size, java.util.Collection.size.

Doc from java.util.Set.size.

Returns the number of elements in this set (its cardinality). If this set contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:int

the number of elements in this set (its cardinality)

Annotations
@Override
writeReplaceback to summary
pack-priv Object writeReplace()

Overrides com.google.common.collect.IndexedImmutableSet.writeReplace.

Annotations
@SuppressWarnings:RedundantOverride
@Override
@J2ktIncompatible
@GwtIncompatible