Class Short2ByteFunctions.PrimitiveFunction

  • All Implemented Interfaces:
    Function<java.lang.Short,​java.lang.Byte>, Short2ByteFunction, java.util.function.Function<java.lang.Short,​java.lang.Byte>, java.util.function.IntUnaryOperator
    Enclosing class:
    Short2ByteFunctions

    public static class Short2ByteFunctions.PrimitiveFunction
    extends java.lang.Object
    implements Short2ByteFunction
    An adapter for mapping generic total functions to partial primitive functions.
    • Method Detail

      • containsKey

        public boolean containsKey​(short key)
        Description copied from interface: Short2ByteFunction
        Returns true if this function contains a mapping for the specified key.

        Note that for some kind of functions (e.g., hashes) this method will always return true. In particular, this default implementation always returns true.

        Specified by:
        containsKey in interface Short2ByteFunction
        Parameters:
        key - the key.
        Returns:
        true if this function associates a value to key.
        See Also:
        Function.containsKey(Object)
      • containsKey

        @Deprecated
        public boolean containsKey​(java.lang.Object key)
        Deprecated.
        Description copied from interface: Short2ByteFunction
        Returns true if this function contains a mapping for the specified key.

        Note that for some kind of functions (e.g., hashes) this method will always return true. This default implementation, in particular, always return true.

        Specified by:
        containsKey in interface Function<java.lang.Short,​java.lang.Byte>
        Specified by:
        containsKey in interface Short2ByteFunction
        Parameters:
        key - the key.
        Returns:
        true if this function associates a value to key.
        See Also:
        Map.containsKey(Object)
      • get

        @Deprecated
        public java.lang.Byte get​(java.lang.Object key)
        Deprecated.
        Description copied from interface: Short2ByteFunction
        Returns the value associated by this function to the specified key.
        Specified by:
        get in interface Function<java.lang.Short,​java.lang.Byte>
        Specified by:
        get in interface Short2ByteFunction
        Parameters:
        key - the key.
        Returns:
        the corresponding value, or null if no value was present for the given key.
        See Also:
        Map.get(Object)
      • put

        @Deprecated
        public java.lang.Byte put​(java.lang.Short key,
                                  java.lang.Byte value)
        Deprecated.
        Description copied from interface: Short2ByteFunction
        Associates the specified value with the specified key in this function (optional operation).
        Specified by:
        put in interface Function<java.lang.Short,​java.lang.Byte>
        Specified by:
        put in interface Short2ByteFunction
        Parameters:
        key - the key.
        value - the value.
        Returns:
        the old value, or null if no value was present for the given key.
        See Also:
        Map.put(Object,Object)