Interface ToChar<T>

    • Method Detail

      • of

        static <T> ToChar<T> of​(ToCharFunction<T> lambda)
        Returns a typed ToChar<T> using the provided lambda.
        Type Parameters:
        T - type to extract from
        Parameters:
        lambda - to convert
        Returns:
        a typed ToChar<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
      • 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 ToChar<T> map​(CharUnaryOperator 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,​CharUnaryOperator,​ToChar<T>>
        Parameters:
        operator - the mapping function
        Returns:
        the mapped expression
      • toUpperCase

        default ToChar<T> toUpperCase()
        Description copied from interface: HasCase
        Returns an expression that is equivalent to this expression, except that results are always in upper-case letters.
        Specified by:
        toUpperCase in interface HasCase<T,​ToChar<T>>
        Returns:
        the upper case expression
      • toLowerCase

        default ToChar<T> toLowerCase()
        Description copied from interface: HasCase
        Returns an expression that is equivalent to this expression, except that results are always in lower-case letters.
        Specified by:
        toLowerCase in interface HasCase<T,​ToChar<T>>
        Returns:
        the lower case 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> ToCharNullable<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