Class Reference2ObjectFunctions.SynchronizedFunction<K,​V>

java.lang.Object
it.unimi.dsi.fastutil.objects.Reference2ObjectFunctions.SynchronizedFunction<K,​V>
All Implemented Interfaces:
it.unimi.dsi.fastutil.Function<K,​V>, it.unimi.dsi.fastutil.objects.Reference2ObjectFunction<K,​V>, java.io.Serializable, java.util.function.Function<K,​V>
Direct Known Subclasses:
Reference2ObjectMaps.SynchronizedMap
Enclosing class:
Reference2ObjectFunctions

public static class Reference2ObjectFunctions.SynchronizedFunction<K,​V>
extends java.lang.Object
implements it.unimi.dsi.fastutil.objects.Reference2ObjectFunction<K,​V>, java.io.Serializable
A synchronized wrapper class for functions.
See Also:
Serialized Form
  • Method Summary

    Modifier and Type Method Description
    V apply​(K key)  
    void clear()  
    boolean containsKey​(java.lang.Object k)  
    V defaultReturnValue()  
    void defaultReturnValue​(V defRetValue)  
    boolean equals​(java.lang.Object o)  
    V get​(java.lang.Object k)  
    V getOrDefault​(java.lang.Object k, V defaultValue)  
    int hashCode()  
    V put​(K k, V v)  
    V remove​(java.lang.Object k)  
    int size()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.util.function.Function

    andThen, compose

    Methods inherited from interface it.unimi.dsi.fastutil.objects.Reference2ObjectFunction

    andThenByte, andThenChar, andThenDouble, andThenFloat, andThenInt, andThenLong, andThenObject, andThenReference, andThenShort, composeByte, composeChar, composeDouble, composeFloat, composeInt, composeLong, composeObject, composeReference, composeShort
  • Method Details

    • apply

      public V apply​(K key)
      Specified by:
      apply in interface it.unimi.dsi.fastutil.Function<K,​V>
      Specified by:
      apply in interface java.util.function.Function<K,​V>
    • size

      public int size()
      Specified by:
      size in interface it.unimi.dsi.fastutil.Function<K,​V>
    • defaultReturnValue

      public V defaultReturnValue()
      Specified by:
      defaultReturnValue in interface it.unimi.dsi.fastutil.objects.Reference2ObjectFunction<K,​V>
    • defaultReturnValue

      public void defaultReturnValue​(V defRetValue)
      Specified by:
      defaultReturnValue in interface it.unimi.dsi.fastutil.objects.Reference2ObjectFunction<K,​V>
    • containsKey

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

      public V put​(K k, V v)
      Specified by:
      put in interface it.unimi.dsi.fastutil.Function<K,​V>
      Specified by:
      put in interface it.unimi.dsi.fastutil.objects.Reference2ObjectFunction<K,​V>
    • get

      public V get​(java.lang.Object k)
      Specified by:
      get in interface it.unimi.dsi.fastutil.Function<K,​V>
      Specified by:
      get in interface it.unimi.dsi.fastutil.objects.Reference2ObjectFunction<K,​V>
    • getOrDefault

      public V getOrDefault​(java.lang.Object k, V defaultValue)
      Specified by:
      getOrDefault in interface it.unimi.dsi.fastutil.Function<K,​V>
      Specified by:
      getOrDefault in interface it.unimi.dsi.fastutil.objects.Reference2ObjectFunction<K,​V>
    • remove

      public V remove​(java.lang.Object k)
      Specified by:
      remove in interface it.unimi.dsi.fastutil.Function<K,​V>
      Specified by:
      remove in interface it.unimi.dsi.fastutil.objects.Reference2ObjectFunction<K,​V>
    • clear

      public void clear()
      Specified by:
      clear in interface it.unimi.dsi.fastutil.Function<K,​V>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object