Class Reference2IntFunctions.SynchronizedFunction<K>

java.lang.Object
it.unimi.dsi.fastutil.objects.Reference2IntFunctions.SynchronizedFunction<K>
All Implemented Interfaces:
it.unimi.dsi.fastutil.Function<K,Integer>, it.unimi.dsi.fastutil.objects.Reference2IntFunction<K>, Serializable, Function<K,Integer>, ToIntFunction<K>
Direct Known Subclasses:
Reference2IntMaps.SynchronizedMap
Enclosing class:
Reference2IntFunctions

public static class Reference2IntFunctions.SynchronizedFunction<K> extends Object implements it.unimi.dsi.fastutil.objects.Reference2IntFunction<K>, Serializable
A synchronized wrapper class for functions.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final it.unimi.dsi.fastutil.objects.Reference2IntFunction<K>
     
    protected final Object
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    SynchronizedFunction(it.unimi.dsi.fastutil.objects.Reference2IntFunction<K> f)
     
    protected
    SynchronizedFunction(it.unimi.dsi.fastutil.objects.Reference2IntFunction<K> f, Object sync)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(K key)
    Deprecated.
    Please use the corresponding type-specific method instead.
    int
    applyAsInt(K operand)
     
    void
     
    boolean
     
    int
     
    void
    defaultReturnValue(int defRetValue)
     
    boolean
     
    Deprecated.
    Please use the corresponding type-specific method instead.
    int
     
    int
    getOrDefault(Object k, int defaultValue)
     
    getOrDefault(Object k, Integer defaultValue)
    Deprecated.
    Please use the corresponding type-specific method instead.
    int
     
    int
    put(K k, int v)
     
    put(K k, Integer v)
    Deprecated.
    Please use the corresponding type-specific method instead.
    Deprecated.
    Please use the corresponding type-specific method instead.
    int
     
    int
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.util.function.Function

    compose

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

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

    • function

      protected final it.unimi.dsi.fastutil.objects.Reference2IntFunction<K> function
    • sync

      protected final Object sync
  • Constructor Details

    • SynchronizedFunction

      protected SynchronizedFunction(it.unimi.dsi.fastutil.objects.Reference2IntFunction<K> f, Object sync)
    • SynchronizedFunction

      protected SynchronizedFunction(it.unimi.dsi.fastutil.objects.Reference2IntFunction<K> f)
  • Method Details

    • applyAsInt

      public int applyAsInt(K operand)
      Specified by:
      applyAsInt in interface it.unimi.dsi.fastutil.objects.Reference2IntFunction<K>
      Specified by:
      applyAsInt in interface ToIntFunction<K>
    • apply

      @Deprecated public Integer apply(K key)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Specified by:
      apply in interface it.unimi.dsi.fastutil.Function<K,Integer>
      Specified by:
      apply in interface Function<K,Integer>
    • size

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

      public int defaultReturnValue()
      Specified by:
      defaultReturnValue in interface it.unimi.dsi.fastutil.objects.Reference2IntFunction<K>
    • defaultReturnValue

      public void defaultReturnValue(int defRetValue)
      Specified by:
      defaultReturnValue in interface it.unimi.dsi.fastutil.objects.Reference2IntFunction<K>
    • containsKey

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

      public int put(K k, int v)
      Specified by:
      put in interface it.unimi.dsi.fastutil.objects.Reference2IntFunction<K>
    • getInt

      public int getInt(Object k)
      Specified by:
      getInt in interface it.unimi.dsi.fastutil.objects.Reference2IntFunction<K>
    • getOrDefault

      public int getOrDefault(Object k, int defaultValue)
      Specified by:
      getOrDefault in interface it.unimi.dsi.fastutil.objects.Reference2IntFunction<K>
    • removeInt

      public int removeInt(Object k)
      Specified by:
      removeInt in interface it.unimi.dsi.fastutil.objects.Reference2IntFunction<K>
    • clear

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

      @Deprecated public Integer put(K k, Integer v)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Specified by:
      put in interface it.unimi.dsi.fastutil.Function<K,Integer>
      Specified by:
      put in interface it.unimi.dsi.fastutil.objects.Reference2IntFunction<K>
    • get

      @Deprecated public Integer get(Object k)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Specified by:
      get in interface it.unimi.dsi.fastutil.Function<K,Integer>
      Specified by:
      get in interface it.unimi.dsi.fastutil.objects.Reference2IntFunction<K>
    • getOrDefault

      @Deprecated public Integer getOrDefault(Object k, Integer defaultValue)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Specified by:
      getOrDefault in interface it.unimi.dsi.fastutil.Function<K,Integer>
      Specified by:
      getOrDefault in interface it.unimi.dsi.fastutil.objects.Reference2IntFunction<K>
    • remove

      @Deprecated public Integer remove(Object k)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Specified by:
      remove in interface it.unimi.dsi.fastutil.Function<K,Integer>
      Specified by:
      remove in interface it.unimi.dsi.fastutil.objects.Reference2IntFunction<K>
    • hashCode

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object