Interface ToByteNullable<T>

    • Method Detail

      • of

        static <T> ToByteNullable<T> of​(Function<T,​Byte> lambda)
        Returns a typed ToByteNullable<T> using the provided lambda.
        Type Parameters:
        T - type to extract from
        Parameters:
        lambda - to convert
        Returns:
        a typed ToByteNullable<T> using the provided lambda
        Throws:
        NullPointerException - if the provided lambda is null
      • expressionType

        default ExpressionType expressionType()
        Description copied from interface: Expression
        Returns the expression type of this expression. It should be safe to cast this instance into the corresponding interface.
        Specified by:
        expressionType in interface Expression<T>
        Returns:
        the expression type
      • orThrow

        default ToByte<T> orThrow()
        Description copied from interface: ToNullable
        Returns an equivalent expression as this, except that it will throw a NullPointerException if given an argument that would cause this expression to return null.
        Specified by:
        orThrow in interface ToNullable<T,​Byte,​ToByte<T>>
        Returns:
        the expression if present
      • orElseGet

        default ToByte<T> orElseGet​(ToByte<T> getter)
        Description copied from interface: ToNullable
        Returns an equivalent expression as this, except that it will return the getter expression if given an argument that would cause this expression to return null.
        Specified by:
        orElseGet in interface ToNullable<T,​Byte,​ToByte<T>>
        Parameters:
        getter - to apply if null
        Returns:
        the expression if present, otherwise return getter
      • orElse

        default ToByte<T> orElse​(Byte value)
        Description copied from interface: ToNullable
        Returns an equivalent expression as this, except that it will return the value if given an argument that would cause this expression to return null.
        Specified by:
        orElse in interface ToNullable<T,​Byte,​ToByte<T>>
        Parameters:
        value - value to use if null
        Returns:
        the expression if present, otherwise return value
      • abs

        default ToByteNullable<T> abs()
        Description copied from interface: HasAbs
        Returns a new expression that returns the absolute value of the result of the current expression.
        Specified by:
        abs in interface HasAbs<T>
        Returns:
        the new expression
      • negate

        default ToByteNullable<T> negate()
        Description copied from interface: HasNegate
        Returns a new expression that returns the absolute value of the result of the current expression. For an example, a positive value will become negative and a negative value will become positive.
        Specified by:
        negate in interface HasNegate<T>
        Returns:
        the new expression
      • sign

        default ToByteNullable<T> sign()
        Description copied from interface: HasSign
        Creates and returns an expression that returns 1 if the result of the this expression is positive, -1 if the result of this expression is negative and 0 if the result of this expression is 0.

        If this expression is nullable and the result was null, then the result of the returned expression will also be null.

        Specified by:
        sign in interface HasSign<T>
        Returns:
        the new expression
      • sqrt

        default ToDoubleNullable<T> sqrt()
        Description copied from interface: HasSqrt
        Creates and returns an expression that returns the square root of the result from the current expression.

        If this expression is nullable and the result was null, then the result of the returned expression will also be null.

        Specified by:
        sqrt in interface HasSqrt<T>
        Returns:
        the new expression
      • hash

        default long hash​(T object)
        Description copied from interface: HasHash
        Hash the specified object into a 64-bit hash. If two equal objects are hashed, they must always result in the same hash. However, objects that are not equal may also result in the same hash.
        Specified by:
        hash in interface HasHash<T>
        Parameters:
        object - the object to hash
        Returns:
        the 64-bit hashcode
      • compose

        default <V> ToByteNullable<V> compose​(Function<? super V,​? extends T> before)
        Description copied from interface: HasCompose
        Returns a composed expression that first applies the before function to its input, and then applies this function to the result. If evaluation of either function throws an exception, it is relayed to the caller of the composed function.
        Specified by:
        compose in interface Function<T,​Byte>
        Specified by:
        compose in interface HasCompose<T>
        Type Parameters:
        V - the type of input to the before function, and to the composed expression
        Parameters:
        before - the function to apply before this function is applied
        Returns:
        a composed function that first applies the before function and then applies this function