Interface ToDouble<T>

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default ToDouble<T> abs()
      Returns a new expression that returns the absolute value of the result of the current expression.
      double applyAsDouble​(T object)  
      default ToDouble<T> asDouble()
      Returns an expression that casts the result of the current expression into a double.
      default ToInt<T> asInt()
      Returns an expression that casts the result of the current expression into an int.
      default ToLong<T> asLong()
      Returns an expression that casts the result of the current expression into a long.
      default int compare​(T first, T second)  
      default <V> ToDoubleNullable<V> compose​(Function<? super V,​? extends T> before)
      Returns a composed expression that first applies the before function to its input, and then applies this function to the result.
      static <T> ToDouble<T> constant​(double value)
      Returns an implementation of this interface that regardless of input, always returns the value specified.
      default ToDouble<T> divide​(double divisor)
      Creates and returns an expression that returns the quotient of the result from the current expression and the divisor.
      default ToDouble<T> divide​(int divisor)
      Creates and returns an expression that returns the quotient of the result from the current expression and the divisor.
      default ToDouble<T> divide​(long divisor)
      Creates and returns an expression that returns the quotient of the result from the current expression and the divisor.
      default ToDouble<T> divide​(ToDouble<T> divisor)
      Creates and returns an expression that returns the quotient of the result from the current expression and the divisor.
      default ToDouble<T> divide​(ToInt<T> divisor)
      Creates and returns an expression that returns the quotient of the result from the current expression and the divisor.
      default ToDouble<T> divide​(ToLong<T> divisor)
      Creates and returns an expression that returns the quotient of the result from the current expression and the divisor.
      default ExpressionType expressionType()
      Returns the expression type of this expression.
      default long hash​(T object)
      Hash the specified object into a 64-bit hash.
      default ToDouble<T> map​(DoubleUnaryOperator operator)
      Returns an expression for the value of this expression mapped using the specified mapping function.
      default ToDouble<T> minus​(byte other)
      Creates and returns an expression that returns the difference of the result from the current expression and the other term.
      default ToDouble<T> minus​(double other)
      Creates and returns an expression that returns the difference of the result from the current expression and the other term.
      default ToDouble<T> minus​(int other)
      Creates and returns an expression that returns the difference of the result from the current expression and the other term.
      default ToDouble<T> minus​(long other)
      Creates and returns an expression that returns the difference of the result from the current expression and the other term.
      default ToDouble<T> minus​(ToByte<T> other)
      Creates and returns an expression that returns the difference of the result from the current expression and the other term.
      default ToDouble<T> minus​(ToDouble<T> other)
      Creates and returns an expression that returns the difference of the result from the current expression and the other term.
      default ToDouble<T> minus​(ToInt<T> other)
      Creates and returns an expression that returns the difference of the result from the current expression and the other term.
      default ToDouble<T> minus​(ToLong<T> other)
      Creates and returns an expression that returns the difference of the result from the current expression and the other term.
      default ToDouble<T> multiply​(byte other)
      Creates and returns an expression that returns the product of the result from the current expression and the other factor.
      default ToDouble<T> multiply​(double other)
      Creates and returns an expression that returns the product of the result from the current expression and the other factor.
      default ToDouble<T> multiply​(int other)
      Creates and returns an expression that returns the product of the result from the current expression and the other factor.
      default ToDouble<T> multiply​(long other)
      Creates and returns an expression that returns the product of the result from the current expression and the other factor.
      default ToDouble<T> multiply​(ToByte<T> other)
      Creates and returns an expression that returns the product of the result from the current expression and the other factor.
      default ToDouble<T> multiply​(ToDouble<T> other)
      Creates and returns an expression that returns the product of the result from the current expression and the other factor.
      default ToDouble<T> multiply​(ToInt<T> other)
      Creates and returns an expression that returns the product of the result from the current expression and the other factor.
      default ToDouble<T> multiply​(ToLong<T> other)
      Creates and returns an expression that returns the product of the result from the current expression and the other factor.
      default ToDouble<T> negate()
      Returns a new expression that returns the absolute value of the result of the current expression.
      static <T> ToDouble<T> of​(ToDoubleFunction<T> lambda)
      Returns a typed ToDouble<T> using the provided lambda.
      default ToDouble<T> plus​(byte other)
      Creates and returns an expression that returns the sum of the result from the current expression and the other term.
      default ToDouble<T> plus​(double other)
      Creates and returns an expression that returns the sum of the result from the current expression and the other term.
      default ToDouble<T> plus​(int other)
      Creates and returns an expression that returns the sum of the result from the current expression and the other term.
      default ToDouble<T> plus​(long other)
      Creates and returns an expression that returns the sum of the result from the current expression and the other term.
      default ToDouble<T> plus​(ToByte<T> other)
      Creates and returns an expression that returns the sum of the result from the current expression and the other term.
      default ToDouble<T> plus​(ToDouble<T> other)
      Creates and returns an expression that returns the sum of the result from the current expression and the other term.
      default ToDouble<T> plus​(ToInt<T> other)
      Creates and returns an expression that returns the sum of the result from the current expression and the other term.
      default ToDouble<T> plus​(ToLong<T> other)
      Creates and returns an expression that returns the sum of the result from the current expression and the other term.
      default ToDouble<T> pow​(double power)
      Creates and returns an expression that returns the exponential power of the result from the current expression.
      default ToDouble<T> pow​(int power)
      Creates and returns an expression that returns the exponential power of the result from the current expression.
      default ToDouble<T> pow​(ToDouble<T> power)
      Creates and returns an expression that returns the exponential power of the result from the current expression.
      default ToDouble<T> pow​(ToInt<T> power)
      Creates and returns an expression that returns the exponential power of the result from the current expression.
      default ToByte<T> sign()
      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.
      default ToDouble<T> sqrt()
      Creates and returns an expression that returns the square root of the result from the current expression.
    • Method Detail

      • of

        static <T> ToDouble<T> of​(ToDoubleFunction<T> lambda)
        Returns a typed ToDouble<T> using the provided lambda.
        Type Parameters:
        T - type to extract from
        Parameters:
        lambda - to convert
        Returns:
        a typed ToDouble<T> using the provided lambda
        Throws:
        NullPointerException - if the provided lambda is null
      • constant

        static <T> ToDouble<T> constant​(double value)
        Returns an implementation of this interface that regardless of input, always returns the value specified.
        Type Parameters:
        T - the type of the ignored input
        Parameters:
        value - the value to always return
        Returns:
        the constant expression
      • 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
      • asDouble

        default ToDouble<T> asDouble()
        Description copied from interface: HasAsDouble
        Returns an expression that casts the result of the current expression into a double.
        Specified by:
        asDouble in interface HasAsDouble<T>
        Returns:
        the casted expression
      • asInt

        default ToInt<T> asInt()
        Description copied from interface: HasAsInt
        Returns an expression that casts the result of the current expression into an int.
        Specified by:
        asInt in interface HasAsInt<T>
        Returns:
        the casted expression
      • asLong

        default ToLong<T> asLong()
        Description copied from interface: HasAsLong
        Returns an expression that casts the result of the current expression into a long.
        Specified by:
        asLong in interface HasAsLong<T>
        Returns:
        the casted expression
      • map

        default ToDouble<T> map​(DoubleUnaryOperator operator)
        Description copied from interface: HasMap
        Returns an expression for the value of this expression mapped using the specified mapping function. The input type remains the same.
        Specified by:
        map in interface HasMap<T,​DoubleUnaryOperator,​ToDouble<T>>
        Parameters:
        operator - the mapping function
        Returns:
        the mapped expression
      • abs

        default ToDouble<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
      • sign

        default ToByte<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 ToDouble<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
      • negate

        default ToDouble<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
      • pow

        default ToDouble<T> pow​(int power)
        Description copied from interface: HasPow
        Creates and returns an expression that returns the exponential power of the result from the current expression. For an example, if the result of the current expression was -3 and the power was set to 2, then the result of the returned expression would be 9.

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

        Specified by:
        pow in interface HasPow<T>
        Parameters:
        power - the power to use as the exponent
        Returns:
        the new expression
      • pow

        default ToDouble<T> pow​(double power)
        Description copied from interface: HasPow
        Creates and returns an expression that returns the exponential power of the result from the current expression. For an example, if the result of the current expression was -3 and the power was set to 2, then the result of the returned expression would be 9.

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

        Specified by:
        pow in interface HasPow<T>
        Parameters:
        power - the power to use as the exponent
        Returns:
        the new expression
      • pow

        default ToDouble<T> pow​(ToInt<T> power)
        Description copied from interface: HasPow
        Creates and returns an expression that returns the exponential power of the result from the current expression. For an example, if the result of the current expression was -3 and the power was set to 2, then the result of the returned expression would be 9.

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

        Specified by:
        pow in interface HasPow<T>
        Parameters:
        power - the power to use as the exponent
        Returns:
        the new expression
      • pow

        default ToDouble<T> pow​(ToDouble<T> power)
        Description copied from interface: HasPow
        Creates and returns an expression that returns the exponential power of the result from the current expression. For an example, if the result of the current expression was -3 and the power was set to 2, then the result of the returned expression would be 9.

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

        Specified by:
        pow in interface HasPow<T>
        Parameters:
        power - the power to use as the exponent
        Returns:
        the new expression
      • plus

        default ToDouble<T> plus​(byte other)
        Description copied from interface: HasPlus
        Creates and returns an expression that returns the sum of the result from the current expression and the other term. For an example, if the result of the current expression was 9 and the other term was set to 3, then the result of the returned expression would be 12.

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

        Specified by:
        plus in interface HasPlus<T>
        Parameters:
        other - the other term used for the addition
        Returns:
        the new expression
      • plus

        default ToDouble<T> plus​(ToByte<T> other)
        Description copied from interface: HasPlus
        Creates and returns an expression that returns the sum of the result from the current expression and the other term. For an example, if the result of the current expression was 9 and the other term was set to 3, then the result of the returned expression would be 12.

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

        Specified by:
        plus in interface HasPlus<T>
        Parameters:
        other - the other term used for the addition
        Returns:
        the new expression
      • plus

        default ToDouble<T> plus​(int other)
        Description copied from interface: HasPlus
        Creates and returns an expression that returns the sum of the result from the current expression and the other term. For an example, if the result of the current expression was 9 and the other term was set to 3, then the result of the returned expression would be 12.

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

        Specified by:
        plus in interface HasPlus<T>
        Parameters:
        other - the other term used for the addition
        Returns:
        the new expression
      • plus

        default ToDouble<T> plus​(ToInt<T> other)
        Description copied from interface: HasPlus
        Creates and returns an expression that returns the sum of the result from the current expression and the other term. For an example, if the result of the current expression was 9 and the other term was set to 3, then the result of the returned expression would be 12.

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

        Specified by:
        plus in interface HasPlus<T>
        Parameters:
        other - the other term used for the addition
        Returns:
        the new expression
      • plus

        default ToDouble<T> plus​(long other)
        Description copied from interface: HasPlus
        Creates and returns an expression that returns the sum of the result from the current expression and the other term. For an example, if the result of the current expression was 9 and the other term was set to 3, then the result of the returned expression would be 12.

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

        Specified by:
        plus in interface HasPlus<T>
        Parameters:
        other - the other term used for the addition
        Returns:
        the new expression
      • plus

        default ToDouble<T> plus​(ToLong<T> other)
        Description copied from interface: HasPlus
        Creates and returns an expression that returns the sum of the result from the current expression and the other term. For an example, if the result of the current expression was 9 and the other term was set to 3, then the result of the returned expression would be 12.

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

        Specified by:
        plus in interface HasPlus<T>
        Parameters:
        other - the other term used for the addition
        Returns:
        the new expression
      • plus

        default ToDouble<T> plus​(double other)
        Description copied from interface: HasPlus
        Creates and returns an expression that returns the sum of the result from the current expression and the other term. For an example, if the result of the current expression was 9 and the other term was set to 3, then the result of the returned expression would be 12.

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

        Specified by:
        plus in interface HasPlus<T>
        Parameters:
        other - the other term used for the addition
        Returns:
        the new expression
      • plus

        default ToDouble<T> plus​(ToDouble<T> other)
        Description copied from interface: HasPlus
        Creates and returns an expression that returns the sum of the result from the current expression and the other term. For an example, if the result of the current expression was 9 and the other term was set to 3, then the result of the returned expression would be 12.

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

        Specified by:
        plus in interface HasPlus<T>
        Parameters:
        other - the other term used for the addition
        Returns:
        the new expression
      • minus

        default ToDouble<T> minus​(byte other)
        Description copied from interface: HasMinus
        Creates and returns an expression that returns the difference of the result from the current expression and the other term. For an example, if the result of the current expression was 9 and the other term was set to 3, then the result of the returned expression would be 6.

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

        Specified by:
        minus in interface HasMinus<T>
        Parameters:
        other - the other term used for the subtraction
        Returns:
        the new expression
      • minus

        default ToDouble<T> minus​(ToByte<T> other)
        Description copied from interface: HasMinus
        Creates and returns an expression that returns the difference of the result from the current expression and the other term. For an example, if the result of the current expression was 9 and the other term was set to 3, then the result of the returned expression would be 6.

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

        Specified by:
        minus in interface HasMinus<T>
        Parameters:
        other - the other term used for the subtraction
        Returns:
        the new expression
      • minus

        default ToDouble<T> minus​(int other)
        Description copied from interface: HasMinus
        Creates and returns an expression that returns the difference of the result from the current expression and the other term. For an example, if the result of the current expression was 9 and the other term was set to 3, then the result of the returned expression would be 6.

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

        Specified by:
        minus in interface HasMinus<T>
        Parameters:
        other - the other term used for the subtraction
        Returns:
        the new expression
      • minus

        default ToDouble<T> minus​(ToInt<T> other)
        Description copied from interface: HasMinus
        Creates and returns an expression that returns the difference of the result from the current expression and the other term. For an example, if the result of the current expression was 9 and the other term was set to 3, then the result of the returned expression would be 6.

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

        Specified by:
        minus in interface HasMinus<T>
        Parameters:
        other - the other term used for the subtraction
        Returns:
        the new expression
      • minus

        default ToDouble<T> minus​(long other)
        Description copied from interface: HasMinus
        Creates and returns an expression that returns the difference of the result from the current expression and the other term. For an example, if the result of the current expression was 9 and the other term was set to 3, then the result of the returned expression would be 6.

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

        Specified by:
        minus in interface HasMinus<T>
        Parameters:
        other - the other term used for the subtraction
        Returns:
        the new expression
      • minus

        default ToDouble<T> minus​(ToLong<T> other)
        Description copied from interface: HasMinus
        Creates and returns an expression that returns the difference of the result from the current expression and the other term. For an example, if the result of the current expression was 9 and the other term was set to 3, then the result of the returned expression would be 6.

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

        Specified by:
        minus in interface HasMinus<T>
        Parameters:
        other - the other term used for the subtraction
        Returns:
        the new expression
      • minus

        default ToDouble<T> minus​(double other)
        Description copied from interface: HasMinus
        Creates and returns an expression that returns the difference of the result from the current expression and the other term. For an example, if the result of the current expression was 9 and the other term was set to 3, then the result of the returned expression would be 6.

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

        Specified by:
        minus in interface HasMinus<T>
        Parameters:
        other - the other term used for the subtraction
        Returns:
        the new expression
      • minus

        default ToDouble<T> minus​(ToDouble<T> other)
        Description copied from interface: HasMinus
        Creates and returns an expression that returns the difference of the result from the current expression and the other term. For an example, if the result of the current expression was 9 and the other term was set to 3, then the result of the returned expression would be 6.

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

        Specified by:
        minus in interface HasMinus<T>
        Parameters:
        other - the other term used for the subtraction
        Returns:
        the new expression
      • multiply

        default ToDouble<T> multiply​(byte other)
        Description copied from interface: HasMultiply
        Creates and returns an expression that returns the product of the result from the current expression and the other factor. For an example, if the result of the current expression was 9 and the factor was set to 3, then the result of the returned expression would be 27.

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

        Specified by:
        multiply in interface HasMultiply<T>
        Parameters:
        other - the other factor used for the multiplication
        Returns:
        the new expression
      • multiply

        default ToDouble<T> multiply​(ToByte<T> other)
        Description copied from interface: HasMultiply
        Creates and returns an expression that returns the product of the result from the current expression and the other factor. For an example, if the result of the current expression was 9 and the factor was set to 3, then the result of the returned expression would be 27.

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

        Specified by:
        multiply in interface HasMultiply<T>
        Parameters:
        other - the other factor used for the multiplication
        Returns:
        the new expression
      • multiply

        default ToDouble<T> multiply​(int other)
        Description copied from interface: HasMultiply
        Creates and returns an expression that returns the product of the result from the current expression and the other factor. For an example, if the result of the current expression was 9 and the factor was set to 3, then the result of the returned expression would be 27.

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

        Specified by:
        multiply in interface HasMultiply<T>
        Parameters:
        other - the other factor used for the multiplication
        Returns:
        the new expression
      • multiply

        default ToDouble<T> multiply​(ToInt<T> other)
        Description copied from interface: HasMultiply
        Creates and returns an expression that returns the product of the result from the current expression and the other factor. For an example, if the result of the current expression was 9 and the factor was set to 3, then the result of the returned expression would be 27.

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

        Specified by:
        multiply in interface HasMultiply<T>
        Parameters:
        other - the other factor used for the multiplication
        Returns:
        the new expression
      • multiply

        default ToDouble<T> multiply​(long other)
        Description copied from interface: HasMultiply
        Creates and returns an expression that returns the product of the result from the current expression and the other factor. For an example, if the result of the current expression was 9 and the factor was set to 3, then the result of the returned expression would be 27.

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

        Specified by:
        multiply in interface HasMultiply<T>
        Parameters:
        other - the other factor used for the multiplication
        Returns:
        the new expression
      • multiply

        default ToDouble<T> multiply​(ToLong<T> other)
        Description copied from interface: HasMultiply
        Creates and returns an expression that returns the product of the result from the current expression and the other factor. For an example, if the result of the current expression was 9 and the factor was set to 3, then the result of the returned expression would be 27.

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

        Specified by:
        multiply in interface HasMultiply<T>
        Parameters:
        other - the other factor used for the multiplication
        Returns:
        the new expression
      • multiply

        default ToDouble<T> multiply​(double other)
        Description copied from interface: HasMultiply
        Creates and returns an expression that returns the product of the result from the current expression and the other factor. For an example, if the result of the current expression was 9 and the factor was set to 3, then the result of the returned expression would be 27.

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

        Specified by:
        multiply in interface HasMultiply<T>
        Parameters:
        other - the other factor used for the multiplication
        Returns:
        the new expression
      • multiply

        default ToDouble<T> multiply​(ToDouble<T> other)
        Description copied from interface: HasMultiply
        Creates and returns an expression that returns the product of the result from the current expression and the other factor. For an example, if the result of the current expression was 9 and the factor was set to 3, then the result of the returned expression would be 27.

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

        Specified by:
        multiply in interface HasMultiply<T>
        Parameters:
        other - the other factor used for the multiplication
        Returns:
        the new expression
      • divide

        default ToDouble<T> divide​(int divisor)
        Description copied from interface: HasDivide
        Creates and returns an expression that returns the quotient of the result from the current expression and the divisor. For an example, if the result of the current expression was 9 and the divisor was set to 3, then the result of the returned expression would be 3.

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

        Specified by:
        divide in interface HasDivide<T>
        Parameters:
        divisor - the divisor used for the division
        Returns:
        the new expression
      • divide

        default ToDouble<T> divide​(ToInt<T> divisor)
        Description copied from interface: HasDivide
        Creates and returns an expression that returns the quotient of the result from the current expression and the divisor. For an example, if the result of the current expression was 9 and the divisor was set to 3, then the result of the returned expression would be 3.

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

        Specified by:
        divide in interface HasDivide<T>
        Parameters:
        divisor - the divisor used for the division
        Returns:
        the new expression
      • divide

        default ToDouble<T> divide​(long divisor)
        Description copied from interface: HasDivide
        Creates and returns an expression that returns the quotient of the result from the current expression and the divisor. For an example, if the result of the current expression was 9 and the divisor was set to 3, then the result of the returned expression would be 3.

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

        Specified by:
        divide in interface HasDivide<T>
        Parameters:
        divisor - the divisor used for the division
        Returns:
        the new expression
      • divide

        default ToDouble<T> divide​(ToLong<T> divisor)
        Description copied from interface: HasDivide
        Creates and returns an expression that returns the quotient of the result from the current expression and the divisor. For an example, if the result of the current expression was 9 and the divisor was set to 3, then the result of the returned expression would be 3.

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

        Specified by:
        divide in interface HasDivide<T>
        Parameters:
        divisor - the divisor used for the division
        Returns:
        the new expression
      • divide

        default ToDouble<T> divide​(double divisor)
        Description copied from interface: HasDivide
        Creates and returns an expression that returns the quotient of the result from the current expression and the divisor. For an example, if the result of the current expression was 9 and the divisor was set to 3, then the result of the returned expression would be 3.

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

        Specified by:
        divide in interface HasDivide<T>
        Parameters:
        divisor - the divisor used for the division
        Returns:
        the new expression
      • divide

        default ToDouble<T> divide​(ToDouble<T> divisor)
        Description copied from interface: HasDivide
        Creates and returns an expression that returns the quotient of the result from the current expression and the divisor. For an example, if the result of the current expression was 9 and the divisor was set to 3, then the result of the returned expression would be 3.

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

        Specified by:
        divide in interface HasDivide<T>
        Parameters:
        divisor - the divisor used for the division
        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> ToDoubleNullable<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 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