ImmutableSet with exactly one element.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final transient E |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public ImmutableList | asList()
Overrides com. ImmutableList containing the same elements, in the same order, as this
collection.
|
| public boolean | contains(Object
element whose presence in this set is to be tested target)Implements abstract com. Implements java. true if this set contains the specified element.
|
| pack-priv int | |
| public final int | hashCode()
Overrides com. Implements java. |
| pack-priv boolean | isPartialView()
Implements abstract com. true if this immutable collection's implementation contains references to
user-created objects that aren't accessible via this collection's methods.
|
| public UnmodifiableIterator | iterator()
Implements abstract com. Implements java. |
| public int | size()
Implements abstract java. Implements java. |
| public String | toString()
Overrides java. |
| pack-priv Object |
| element | back to summary |
|---|---|
| pack-priv final transient E element | |
| SingletonImmutableSet | back to summary |
|---|---|
| pack-priv SingletonImmutableSet(E element) | |
| asList | back to summary |
|---|---|
| public ImmutableList Overrides com. Doc from com. Returns an Performance note: in most cases this method can return quickly without actually copying anything. The exact circumstances under which the copy is performed are undefined and subject to change.
| |
| contains | back to summary |
|---|---|
| public boolean contains(Object target) Implements abstract com. Implements java. Doc from java. Returns | |
| copyIntoArray | back to summary |
|---|---|
pack-priv int copyIntoArray(@Nullable Object[] dst, int offset)
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Overrides com. Implements java. Doc from java. Returns the hash code value for this set. The hash code of a set is
defined to be the sum of the hash codes of the elements in the set,
where the hash code of a
| |
| isPartialView | back to summary |
|---|---|
| pack-priv boolean isPartialView() Implements abstract com. Doc from com. Returns
| |
| iterator | back to summary |
|---|---|
| public UnmodifiableIterator Implements abstract com. Implements java. Doc from java. Returns an iterator over the elements in this set. The elements are returned in no particular order (unless this set is an instance of some class that provides a guarantee).
| |
| size | back to summary |
|---|---|
| public int size() Implements abstract java. Implements java. Doc from java. Returns the number of elements in this set (its cardinality). If this
set contains more than
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of this collection. The string
representation consists of a list of the collection's elements in the
order they are returned by its iterator, enclosed in square brackets
( | |
| writeReplace | back to summary |
|---|---|
| pack-priv Object writeReplace() Overrides com.
| |