Class Object2IntFunctions.SynchronizedFunction<K>

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

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

    • function

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

      protected final Object sync
  • Constructor Details

    • SynchronizedFunction

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

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

    • applyAsInt

      public int applyAsInt(K operand)
      Specified by:
      applyAsInt in interface it.unimi.dsi.fastutil.objects.Object2IntFunction<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.Object2IntFunction<K>
    • defaultReturnValue

      public void defaultReturnValue(int defRetValue)
      Specified by:
      defaultReturnValue in interface it.unimi.dsi.fastutil.objects.Object2IntFunction<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.Object2IntFunction<K>
    • getInt

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

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

      public int removeInt(Object k)
      Specified by:
      removeInt in interface it.unimi.dsi.fastutil.objects.Object2IntFunction<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.Object2IntFunction<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.Object2IntFunction<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.Object2IntFunction<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.Object2IntFunction<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