ImmutableMultiset with zero or more elements.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private transient ImmutableSet | |
| pack-priv static final ImmutableMultiset | |
| private static final Multisets. | |
| private final transient Multisets. | |
| pack-priv static final double | HASH_FLOODING_FPP
Maximum allowed false positive probability of detecting a hash flooding attack given random input. |
| private final transient int | |
| private final transient @Nullable Multisets. | |
| pack-priv static final int | MAX_HASH_BUCKET_LENGTH
Maximum allowed length of a hash table bucket before falling back to a j.u.HashMap based implementation. |
| pack-priv static final double | MAX_LOAD_FACTOR
Closed addressing tends to perform well even with high load factors. |
| private final transient int |
| Access | Constructor and Description |
|---|---|
| private | RegularImmutableMultiset(Multisets.
|
| Modifier and Type | Method and Description |
|---|---|
| public int | count(Object
the element to count occurrences of element)Implements com. |
| pack-priv static <E> ImmutableMultiset | |
| public ImmutableSet | elementSet()
Implements abstract com. Implements com. |
| pack-priv Multiset. | |
| public int | hashCode()
Overrides com. Implements com. |
| private static boolean | |
| 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 int | size()
Implements abstract java. Implements com. |
| pack-priv Object |
| elementSet | back to summary |
|---|---|
| private transient ImmutableSet<E> elementSet
| |
| EMPTY | back to summary |
|---|---|
| pack-priv static final ImmutableMultiset<Object> EMPTY | |
| EMPTY_ARRAY | back to summary |
|---|---|
| private static final Multisets. Hides com. | |
| entries | back to summary |
|---|---|
| private final transient Multisets. | |
| HASH_FLOODING_FPP | back to summary |
|---|---|
| pack-priv static final double HASH_FLOODING_FPP Maximum allowed false positive probability of detecting a hash flooding attack given random input. | |
| hashCode | back to summary |
|---|---|
| private final transient int hashCode | |
| hashTable | back to summary |
|---|---|
| private final transient @Nullable Multisets. | |
| MAX_HASH_BUCKET_LENGTH | back to summary |
|---|---|
| pack-priv static final int MAX_HASH_BUCKET_LENGTH Maximum allowed length of a hash table bucket before falling back to a j.u.HashMap based implementation. Experimentally determined. | |
| MAX_LOAD_FACTOR | back to summary |
|---|---|
| pack-priv static final double MAX_LOAD_FACTOR Closed addressing tends to perform well even with high load factors. Being conservative here ensures that the table is still likely to be relatively sparse (hence it misses fast) while saving space. | |
| size | back to summary |
|---|---|
| private final transient int size | |
| RegularImmutableMultiset | back to summary |
|---|---|
| private RegularImmutableMultiset(Multisets. | |
| count | back to summary |
|---|---|
| public int count(Object element) Implements com. Doc from com. Returns the number of occurrences of an element in this multiset (the count of the
element). Note that for an Note the utility method | |
| create | back to summary |
|---|---|
| pack-priv static <E> ImmutableMultiset | |
| elementSet | back to summary |
|---|---|
| public ImmutableSet Implements abstract com. Implements com. Doc from com. Returns the set of distinct elements contained in this multiset. The element set is backed by the same data as the multiset, so any change to either is immediately reflected in the other. The order of the elements in the element set is unspecified. If the element set supports any removal operations, these necessarily cause all occurrences of the removed element(s) to be removed from the multiset. Implementations are not expected to support the add operations, although this is possible. A common use for the element set is to find the number of distinct elements in the multiset:
| |
| getEntry | back to summary |
|---|---|
| pack-priv Multiset. Implements abstract com.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides com. Implements com. Doc from com. Returns the hash code for this multiset. This is defined as the sum of
over all distinct elements in the multiset. It follows that a multiset and its entry set always have the same hash code.
| |
| hashFloodingDetected | back to summary |
|---|---|
| private static boolean hashFloodingDetected(@Nullable Multisets. | |
| isPartialView | back to summary |
|---|---|
| pack-priv boolean isPartialView() Implements abstract com. Doc from com. Returns
| |
| size | back to summary |
|---|---|
| public int size() Implements abstract java. Implements com. Doc from com. Returns the total number of all occurrences of all elements in this multiset. Note this method does not return the number of distinct elements in the
multiset, which is given by
| |
| writeReplace | back to summary |
|---|---|
| pack-priv Object writeReplace() Overrides com.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Multisets. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Multisets. |
| nextInBucket | back to summary |
|---|---|
| private final Multisets. | |
| NonTerminalEntry | back to summary |
|---|---|
| pack-priv NonTerminalEntry(E element, int count, Multisets. | |
| nextInBucket | back to summary |
|---|---|
| public Multisets. Overrides com.
| |