The difference between UnifiedMap and UnifiedMapWithHashingStrategy is that a HashingStrategy based UnifiedMap does not rely on the hashCode or equality of the object at the key, but instead relies on a HashingStrategy implementation provided by a developer to compute the hashCode and equals for the objects stored in the map.
| Modifier and Type | Class and Description |
|---|---|
| protected class | |
| protected class | |
| protected class | |
| protected class | |
| protected abstract class | |
| protected class | |
| protected class | |
| protected static class |
| Modifier and Type | Field and Description |
|---|---|
| protected static final Object | |
| protected static final int | |
| protected static final float | |
| protected HashingStrategy | |
| protected float | |
| protected int | |
| protected static final Object | |
| protected transient int | |
| private static final long | |
| protected transient Object[] |
| Access | Constructor and Description |
|---|---|
| public | UnifiedMapWithHashingStrategy()
Deprecated
No argument default constructor used for serialization. Instantiating an UnifiedMapWithHashingStrategyMultimap with
this constructor will have a null hashingStrategy and throw NullPointerException when used.
|
| public | |
| public | |
| public | UnifiedMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy, int initialCapacity, float loadFactor)
|
| public | UnifiedMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy, Map<? extends K, ? extends V> map)
|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected int | |
| protected void | |
| public boolean | allSatisfy(Predicate<? super V> predicate)
Overrides org. Implements org. Returns true if the predicate evaluates to true for every element of the iterable or if the iterable is empty. |
| public <P> boolean | allSatisfyWith(Predicate2<? super V, ? super P> predicate, P parameter)
Overrides org. Implements org. Returns true if the predicate evaluates to true for every element of the collection, or returns false. |
| public boolean | anySatisfy(Predicate<? super V> predicate)
Overrides org. Implements org. Returns true if the predicate evaluates to true for any element of the iterable. |
| public <P> boolean | anySatisfyWith(Predicate2<? super V, ? super P> predicate, P parameter)
Overrides org. Implements org. Returns true if the predicate evaluates to true for any element of the collection, or return false. |
| public void | batchForEach(Procedure<? super V> procedure, int sectionIndex, int sectionCount)
Implements org.
|
| private boolean | |
| private boolean | |
| private boolean | |
| private void | |
| private void | |
| private void | |
| private <P> void | |
| private int | chainedForEachValueWithIndex(Object[] chain, ObjectIntProcedure<? super V> objectIntProcedure, int index)
|
| private V | |
| private V | |
| private <P> V | |
| private int | |
| private V | chainedMerge(K key, int index, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction)
|
| private V | |
| private void | |
| private V | chainedUpdateValue(K key, int index, Function0<? extends V> factory, Function<? super V, ? extends V> function)
|
| private <P> V | chainedUpdateValueWith(K key, int index, Function0<? extends V> factory, Function2<? super V, ? super P, ? extends V> function, P parameter)
|
| public void | clear()
Implements java. Removes all of the mappings from this map (optional operation). |
| public UnifiedMapWithHashingStrategy | clone()
Implements abstract org. Implements org. Creates and returns a copy of this object. |
| public <E> MutableMap | collectKeysAndValues(Iterable<E> iterable, Function<? super E, ? extends K> keyFunction, Function<? super E, ? extends V> valueFunction)
Implements org. Adds all the entries derived from |
| public <R> MutableMap | collectValues(Function2<? super K, ? super V, ? extends R> function)
Overrides org. Implements org. For each key and value of the map the function is evaluated. |
| protected void | |
| public boolean | containsKey(Object key)
Implements org. Returns |
| public boolean | containsValue(Object value)
Implements org. Returns |
| private void | |
| protected void | |
| public Pair | detect(Predicate2<? super K, ? super V> predicate)
Overrides org. Implements org. Return the first key and value of the map for which the predicate evaluates to true when they are given as arguments. |
| public V | detect(Predicate<? super V> predicate)
Overrides org. Implements org. Returns the first element of the iterable for which the predicate evaluates to true or null in the case where no element returns true. |
| public V | detectIfNone(Predicate<? super V> predicate, Function0<? extends V> function)
Overrides org. Overrides default org. Returns the first element of the iterable for which the predicate evaluates to true. |
| public Optional | detectOptional(Predicate2<? super K, ? super V> predicate)
Overrides org. Implements org. Return the first key and value of the map as an Optional for which the predicate evaluates to true when they are given as arguments. |
| public Optional | detectOptional(Predicate<? super V> predicate)
Overrides org. Implements org. Returns the first element of the iterable for which the predicate evaluates to true as an Optional. |
| public <P> V | detectWith(Predicate2<? super V, ? super P> predicate, P parameter)
Overrides org. Implements org. Returns the first element that evaluates to true for the specified predicate2 and parameter, or null if none evaluate to true. |
| public <P> V | detectWithIfNone(Predicate2<? super V, ? super P> predicate, P parameter, Function0<? extends V> function)
Overrides org. Implements org. Returns the first element of the iterable that evaluates to true for the specified predicate2 and parameter, or returns the value of evaluating the specified function. |
| public <P> Optional | detectWithOptional(Predicate2<? super V, ? super P> predicate, P parameter)
Overrides org. Implements org. Returns the first element that evaluates to true for the specified predicate2 and parameter as an Optional. |
| public Set | entrySet()
Implements java. Returns a |
| public boolean | equals(Object object)
Overrides java. Implements org. Follows the same general contract as |
| private int | |
| public void | forEachKey(Procedure<? super K> procedure)
Overrides org. Implements org. Calls the |
| public void | forEachKeyValue(Procedure2<? super K, ? super V> procedure)
Implements org. Calls the |
| public void | forEachValue(Procedure<? super V> procedure)
Overrides org. Implements org. Calls the procedure with each value of the map. |
| public <P> void | forEachWith(Procedure2<? super V, ? super P> procedure, P parameter)
Overrides org. Implements org. The procedure2 is evaluated for each element in the iterable with the specified parameter provided as the second argument. |
| public void | forEachWithIndex(ObjectIntProcedure<? super V> objectIntProcedure)
Overrides org. Implements org. Iterates over the iterable passing each element and the current relative int index to the specified instance of ObjectIntProcedure. |
| public V | get(Object key)
Implements org. Returns the value to which the specified key is mapped,
or |
| public int | getBatchCount(int batchSize)
Implements org.
|
| public int | |
| private Set | |
| public V | getFirst()
Overrides org. Implements org. Returns the first element of an iterable. |
| private V | |
| public V | getIfAbsentPut(K key, Function0<? extends V> function)
Overrides org. Implements org. Get and return the value in the Map at the specified key. |
| public V | getIfAbsentPut(K key, V value)
Overrides org. Implements org. Get and return the value in the Map at the specified key. |
| public <P> V | getIfAbsentPutWith(K key, Function<? super P, ? extends V> function, P parameter)
Overrides org. Implements org. Get and return the value in the Map at the specified key. |
| public int | Returns: the number of JVM words that is used by this map.Returns the number of JVM words that is used by this map. |
| public int | hashCode()
Overrides java. Implements org. Follows the same general contract as |
| public HashingStrategy | |
| protected int | |
| protected int | |
| public boolean | isEmpty()
Overrides org. Implements org. Returns |
| public Set | |
| public V | merge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction)
Overrides default java. If the specified key is not already associated with a value or is associated with null, associates it with the given non-null value (optional operation). |
| public MutableMap | newEmpty()
Implements org. Creates a new instance of the same type, using the default capacity and growth parameters. |
| public MutableMap | newEmpty(int capacity)
Implements abstract org. Creates a new instance of the same type, using the given capacity and the default growth parameters. |
| public static <K, V> UnifiedMapWithHashingStrategy | |
| public static <K, V> UnifiedMapWithHashingStrategy | |
| public static <K, V> UnifiedMapWithHashingStrategy | |
| public static <K, V> UnifiedMapWithHashingStrategy | |
| public static <K, V> UnifiedMapWithHashingStrategy | |
| public static <K, V> UnifiedMapWithHashingStrategy | |
| public static <K, V> UnifiedMapWithHashingStrategy | |
| public static <K, V> UnifiedMapWithHashingStrategy | |
| public static <K, V> UnifiedMapWithHashingStrategy | |
| public static <K, V> UnifiedMapWithHashingStrategy | newWithKeysValues(HashingStrategy<? super K> hashingStrategy, K key1, V value1, K key2, V value2, K key3, V value3)
|
| public static <K, V> UnifiedMapWithHashingStrategy | newWithKeysValues(HashingStrategy<? super K> hashingStrategy, K key1, V value1, K key2, V value2, K key3, V value3, K key4, V value4)
|
| public boolean | noneSatisfy(Predicate<? super V> predicate)
Overrides org. Implements org. Returns true if the predicate evaluates to false for every element of the iterable or if the iterable is empty. |
| public <P> boolean | noneSatisfyWith(Predicate2<? super V, ? super P> predicate, P parameter)
Overrides org. Implements org. Returns true if the predicate evaluates to false for every element of the collection, or return false. |
| private boolean | |
| private K | |
| private static boolean | |
| private void | |
| public V | put(K key, V value)
Implements java. Associates the specified value with the specified key in this map (optional operation). |
| public void | putAll(Map<? extends K, ? extends V> map)
Implements java. Copies all of the mappings from the specified map to this map (optional operation). |
| private void | |
| public void | readExternal(ObjectInput in)
Implements java. The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. |
| protected void | |
| public V | remove(Object key)
Implements java. Removes the mapping for a key from this map if it is present (optional operation). |
| private V | |
| public boolean | removeIf(Predicate2<? super K, ? super V> predicate)
Overrides default org. Remove an entry from the map if the |
| public V | removeKey(K key)
Implements org. Remove an entry from the map at the specified |
| private boolean | shortCircuit(Predicate<? super V> predicate, boolean expected, boolean onShortCircuit, boolean atEnd)
|
| private <P> boolean | shortCircuitWith(Predicate2<? super V, ? super P> predicate, P parameter, boolean expected, boolean onShortCircuit, boolean atEnd)
|
| public int | size()
Implements org. Returns the number of key-value mappings in this map. |
| public ImmutableMap | toImmutable()
Overrides org. Implements org. Returns an immutable copy of this map. |
| private static Object | |
| public String | toString()
Overrides org. Implements org. Returns a string with the keys and values of this map separated by commas with spaces and enclosed in curly braces. |
| public boolean | |
| public V | updateValue(K key, Function0<? extends V> factory, Function<? super V, ? extends V> function)
Overrides org. Implements org. Looks up the value associated with |
| public <P> V | updateValueWith(K key, Function0<? extends V> factory, Function2<? super V, ? super P, ? extends V> function, P parameter)
Overrides org. Implements org. Same as |
| public Collection | values()
Implements java. Returns a |
| public UnifiedMapWithHashingStrategy | |
| public UnifiedMapWithHashingStrategy | |
| public UnifiedMapWithHashingStrategy | |
| public UnifiedMapWithHashingStrategy | |
| public void | writeExternal(ObjectOutput out)
Implements java. The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays. |
| private void |