Class Long2ReferenceFunctions.SynchronizedFunction<V>

java.lang.Object
it.unimi.dsi.fastutil.longs.Long2ReferenceFunctions.SynchronizedFunction<V>
All Implemented Interfaces:
it.unimi.dsi.fastutil.Function<Long,V>, it.unimi.dsi.fastutil.longs.Long2ReferenceFunction<V>, Serializable, Function<Long,V>, LongFunction<V>
Direct Known Subclasses:
Long2ReferenceMaps.SynchronizedMap
Enclosing class:
Long2ReferenceFunctions

public static class Long2ReferenceFunctions.SynchronizedFunction<V> extends Object implements it.unimi.dsi.fastutil.longs.Long2ReferenceFunction<V>, Serializable
A synchronized wrapper class for functions.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final it.unimi.dsi.fastutil.longs.Long2ReferenceFunction<V>
     
    protected final Object
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    SynchronizedFunction(it.unimi.dsi.fastutil.longs.Long2ReferenceFunction<V> f)
     
    protected
    SynchronizedFunction(it.unimi.dsi.fastutil.longs.Long2ReferenceFunction<V> f, Object sync)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(long operand)
     
    apply(Long key)
    Deprecated.
    Please use the corresponding type-specific method instead.
    void
     
    boolean
    containsKey(long k)
     
    boolean
    Deprecated.
     
    void
    defaultReturnValue(V defRetValue)
     
    boolean
     
    get(long k)
     
    Deprecated.
    Please use the corresponding type-specific method instead.
    getOrDefault(long k, V defaultValue)
     
    getOrDefault(Object k, V defaultValue)
    Deprecated.
    Please use the corresponding type-specific method instead.
    int
     
    put(long k, V v)
     
    put(Long k, V v)
    Deprecated.
    Please use the corresponding type-specific method instead.
    remove(long k)
     
    Deprecated.
    Please use the corresponding type-specific method instead.
    int
     
     

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface java.util.function.Function

    andThen

    Methods inherited from interface it.unimi.dsi.fastutil.longs.Long2ReferenceFunction

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

    • function

      protected final it.unimi.dsi.fastutil.longs.Long2ReferenceFunction<V> function
    • sync

      protected final Object sync
  • Constructor Details

    • SynchronizedFunction

      protected SynchronizedFunction(it.unimi.dsi.fastutil.longs.Long2ReferenceFunction<V> f, Object sync)
    • SynchronizedFunction

      protected SynchronizedFunction(it.unimi.dsi.fastutil.longs.Long2ReferenceFunction<V> f)
  • Method Details

    • apply

      public V apply(long operand)
      Specified by:
      apply in interface it.unimi.dsi.fastutil.longs.Long2ReferenceFunction<V>
      Specified by:
      apply in interface LongFunction<V>
    • apply

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

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

      public V defaultReturnValue()
      Specified by:
      defaultReturnValue in interface it.unimi.dsi.fastutil.longs.Long2ReferenceFunction<V>
    • defaultReturnValue

      public void defaultReturnValue(V defRetValue)
      Specified by:
      defaultReturnValue in interface it.unimi.dsi.fastutil.longs.Long2ReferenceFunction<V>
    • containsKey

      public boolean containsKey(long k)
      Specified by:
      containsKey in interface it.unimi.dsi.fastutil.longs.Long2ReferenceFunction<V>
    • containsKey

      @Deprecated public boolean containsKey(Object k)
      Deprecated.
      Specified by:
      containsKey in interface it.unimi.dsi.fastutil.Function<Long,V>
      Specified by:
      containsKey in interface it.unimi.dsi.fastutil.longs.Long2ReferenceFunction<V>
    • put

      public V put(long k, V v)
      Specified by:
      put in interface it.unimi.dsi.fastutil.longs.Long2ReferenceFunction<V>
    • get

      public V get(long k)
      Specified by:
      get in interface it.unimi.dsi.fastutil.longs.Long2ReferenceFunction<V>
    • getOrDefault

      public V getOrDefault(long k, V defaultValue)
      Specified by:
      getOrDefault in interface it.unimi.dsi.fastutil.longs.Long2ReferenceFunction<V>
    • remove

      public V remove(long k)
      Specified by:
      remove in interface it.unimi.dsi.fastutil.longs.Long2ReferenceFunction<V>
    • clear

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

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

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

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

      @Deprecated public V remove(Object k)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Specified by:
      remove in interface it.unimi.dsi.fastutil.Function<Long,V>
      Specified by:
      remove in interface it.unimi.dsi.fastutil.longs.Long2ReferenceFunction<V>
    • 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