Interface Char2CharMap

All Superinterfaces:
Char2CharFunction, Function<Character,​Character>, Function<Character,​Character>, IntUnaryOperator, Map<Character,​Character>
All Known Subinterfaces:
Char2CharSortedMap
All Known Implementing Classes:
AbstractChar2CharMap, AbstractChar2CharSortedMap, Char2CharArrayMap, Char2CharAVLTreeMap, Char2CharLinkedOpenHashMap, Char2CharMaps.EmptyMap, Char2CharMaps.Singleton, Char2CharMaps.SynchronizedMap, Char2CharMaps.UnmodifiableMap, Char2CharOpenCustomHashMap, Char2CharOpenHashMap, Char2CharRBTreeMap, Char2CharSortedMaps.EmptySortedMap, Char2CharSortedMaps.Singleton, Char2CharSortedMaps.SynchronizedSortedMap, Char2CharSortedMaps.UnmodifiableSortedMap

public interface Char2CharMap
extends Char2CharFunction, Map<Character,​Character>
A type-specific Map; provides some additional methods that use polymorphism to avoid (un)boxing, and handling of a default return value.

Besides extending the corresponding type-specific function, this interface strengthens Map.entrySet(), keySet() and values(). Moreover, a number of methods, such as size(), defaultReturnValue(), etc., are un-defaulted as their function default do not make sense for a map. Maps returning entry sets of type Char2CharMap.FastEntrySet support also fast iteration.

A submap or subset may or may not have an independent default return value (which however must be initialized to the default return value of the originator).

See Also:
Map
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Interface Description
    static interface  Char2CharMap.Entry
    A type-specific Map.Entry; provides some additional methods that use polymorphism to avoid (un)boxing.
    static interface  Char2CharMap.FastEntrySet
    An entry set providing fast iteration.
  • Method Summary

    Modifier and Type Method Description
    ObjectSet<Char2CharMap.Entry> char2CharEntrySet()
    Returns a type-specific set view of the mappings contained in this map.
    default void clear()
    Removes all of the mappings from this map (optional operation).
    default char compute​(char key, BiFunction<? super Character,​? super Character,​? extends Character> remappingFunction)
    Attempts to compute a mapping for the specified key and its current mapped value (or null if there is no current mapping).
    default Character compute​(Character key, BiFunction<? super Character,​? super Character,​? extends Character> remappingFunction)
    Deprecated.
    Please use the corresponding type-specific method instead.
    default char computeIfAbsent​(char key, IntUnaryOperator mappingFunction)
    If the specified key is not already associated with a value, attempts to compute its value using the given mapping function and enters it into this map.
    default Character computeIfAbsent​(Character key, Function<? super Character,​? extends Character> mappingFunction)
    Deprecated.
    Please use the corresponding type-specific method instead.
    default char computeIfAbsentNullable​(char key, IntFunction<? extends Character> mappingFunction)
    If the specified key is not already associated with a value, attempts to compute its value using the given mapping function and enters it into this map unless it is null.
    default char computeIfAbsentPartial​(char key, Char2CharFunction mappingFunction)
    If the specified key is not already associated with a value, attempts to compute its value using the given mapping function and enters it into this map, unless the key is not present in the given mapping function.
    default char computeIfPresent​(char key, BiFunction<? super Character,​? super Character,​? extends Character> remappingFunction)
    If the value for the specified key is present, attempts to compute a new mapping given the key and its current mapped value.
    default Character computeIfPresent​(Character key, BiFunction<? super Character,​? super Character,​? extends Character> remappingFunction)
    Deprecated.
    Please use the corresponding type-specific method instead.
    boolean containsKey​(char key)
    Returns true if this function contains a mapping for the specified key.
    default boolean containsKey​(Object key)
    Deprecated.
    Please use the corresponding type-specific method instead.
    boolean containsValue​(char value)
    Returns true if this map maps one or more keys to the specified value.
    default boolean containsValue​(Object value)
    Deprecated.
    Please use the corresponding type-specific method instead.
    char defaultReturnValue()
    Gets the default return value.
    void defaultReturnValue​(char rv)
    Sets the default return value (optional operation).
    default ObjectSet<Map.Entry<Character,​Character>> entrySet()
    Deprecated.
    Please use the corresponding type-specific method instead.
    default Character get​(Object key)
    Deprecated.
    Please use the corresponding type-specific method instead.
    default char getOrDefault​(char key, char defaultValue)
    Returns the value to which the specified key is mapped, or the defaultValue if this map contains no mapping for the key.
    default Character getOrDefault​(Object key, Character defaultValue)
    Deprecated.
    Please use the corresponding type-specific method instead.
    CharSet keySet()
    default char merge​(char key, char value, BiFunction<? super Character,​? super Character,​? extends Character> remappingFunction)
    If the specified key is not already associated with a value, associates it with the given value.
    default Character merge​(Character key, Character value, BiFunction<? super Character,​? super Character,​? extends Character> remappingFunction)
    Deprecated.
    Please use the corresponding type-specific method instead.
    default Character put​(Character key, Character value)
    Deprecated.
    Please use the corresponding type-specific method instead.
    default char putIfAbsent​(char key, char value)
    If the specified key is not already associated with a value, associates it with the given value and returns the default return value, else returns the current value.
    default Character putIfAbsent​(Character key, Character value)
    Deprecated.
    Please use the corresponding type-specific method instead.
    default boolean remove​(char key, char value)
    Removes the entry for the specified key only if it is currently mapped to the specified value.
    default Character remove​(Object key)
    Deprecated.
    Please use the corresponding type-specific method instead.
    default boolean remove​(Object key, Object value)
    Deprecated.
    Please use the corresponding type-specific method instead.
    default char replace​(char key, char value)
    Replaces the entry for the specified key only if it is currently mapped to some value.
    default boolean replace​(char key, char oldValue, char newValue)
    Replaces the entry for the specified key only if currently mapped to the specified value.
    default Character replace​(Character key, Character value)
    Deprecated.
    Please use the corresponding type-specific method instead.
    default boolean replace​(Character key, Character oldValue, Character newValue)
    Deprecated.
    Please use the corresponding type-specific method instead.
    int size()
    Returns the number of key/value mappings in this map.
    CharCollection values()

    Methods inherited from interface it.unimi.dsi.fastutil.chars.Char2CharFunction

    applyAsInt, get, put, remove

    Methods inherited from interface it.unimi.dsi.fastutil.Function

    apply

    Methods inherited from interface java.util.function.Function

    andThen, compose

    Methods inherited from interface java.util.function.IntUnaryOperator

    andThen, compose

    Methods inherited from interface java.util.Map

    equals, forEach, hashCode, isEmpty, putAll, replaceAll