Class Reference2CharFunctions.PrimitiveFunction<K>

java.lang.Object
it.unimi.dsi.fastutil.objects.Reference2CharFunctions.PrimitiveFunction<K>
All Implemented Interfaces:
it.unimi.dsi.fastutil.Function<K,​java.lang.Character>, Reference2CharFunction<K>, java.util.function.Function<K,​java.lang.Character>, java.util.function.ToIntFunction<K>
Enclosing class:
Reference2CharFunctions

public static class Reference2CharFunctions.PrimitiveFunction<K>
extends java.lang.Object
implements Reference2CharFunction<K>
An adapter for mapping generic total functions to partial primitive functions.
  • Method Details

    • containsKey

      public boolean containsKey​(java.lang.Object key)
      Specified by:
      containsKey in interface it.unimi.dsi.fastutil.Function<K,​java.lang.Character>
    • getChar

      public char getChar​(java.lang.Object key)
      Description copied from interface: Reference2CharFunction
      Returns the value to which the given key is mapped.
      Specified by:
      getChar in interface Reference2CharFunction<K>
      Parameters:
      key - the key.
      Returns:
      the corresponding value, or the default return value if no value was present for the given key.
      See Also:
      Function.get(Object)
    • getOrDefault

      public char getOrDefault​(java.lang.Object key, char defaultValue)
      Description copied from interface: Reference2CharFunction
      Returns the value associated by this function to the specified key, or give the specified value if not present.
      Specified by:
      getOrDefault in interface Reference2CharFunction<K>
      Parameters:
      key - the key.
      defaultValue - the value to return if not present.
      Returns:
      the corresponding value, or defaultValue if no value was present for the given key.
      See Also:
      Function.getOrDefault(Object, Object)
    • get

      @Deprecated public java.lang.Character get​(java.lang.Object key)
      Deprecated.
      Description copied from interface: Reference2CharFunction
      Specified by:
      get in interface it.unimi.dsi.fastutil.Function<K,​java.lang.Character>
      Specified by:
      get in interface Reference2CharFunction<K>
    • getOrDefault

      @Deprecated public java.lang.Character getOrDefault​(java.lang.Object key, java.lang.Character defaultValue)
      Deprecated.
      Description copied from interface: Reference2CharFunction
      Specified by:
      getOrDefault in interface it.unimi.dsi.fastutil.Function<K,​java.lang.Character>
      Specified by:
      getOrDefault in interface Reference2CharFunction<K>
    • put

      @Deprecated public java.lang.Character put​(K key, java.lang.Character value)
      Deprecated.
      Description copied from interface: Reference2CharFunction
      Specified by:
      put in interface it.unimi.dsi.fastutil.Function<K,​java.lang.Character>
      Specified by:
      put in interface Reference2CharFunction<K>