T - type to extract from@FunctionalInterface public interface ToLongNullable<T> extends Expression<T>, ToNullable<T,Long,ToLong<T>>, ToLongFunction<T>, HasAbs<ToLongNullable<T>>, HasSign<ToByteNullable<T>>, HasSqrt<ToDoubleNullable<T>>, HasNegate<ToLongNullable<T>>, HasMapToDoubleIfPresent<T,LongToDoubleFunction>, HasMapIfPresent<T,LongUnaryOperator,ToLongNullable<T>>, HasHash<T>, HasCompare<T>, HasCompose<T>
long value, or
null. This expression can be implemented using a lamda, or it can be
a result of another operation. It has additional methods for operating on it.Function| Modifier and Type | Method and Description |
|---|---|
default ToLongNullable<T> |
abs()
Returns a new expression that returns the absolute value of the result
of the current expression.
|
default long |
applyAsLong(T object) |
default int |
compare(T first,
T second) |
default <V> ToLongNullable<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. |
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 ToLongNullable<T> |
mapIfPresent(LongUnaryOperator mapper)
Returns an expression for the value of this expression mapped using the
specified mapping function.
|
default ToDoubleNullable<T> |
mapToDoubleIfPresent(LongToDoubleFunction mapper)
Maps the result of this expression into a
double by passing it to
the specified mapper, producing a new expression that implements
ToDouble. |
default ToLongNullable<T> |
negate()
Returns a new expression that returns the absolute value of the result
of the current expression.
|
static <T> ToLongNullable<T> |
of(Function<T,Long> lambda)
Returns a typed
ToLongNullable<T> using the provided
lambda. |
default ToLong<T> |
orElse(Long value)
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. |
default ToLong<T> |
orElseGet(ToLong<T> getter)
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. |
default ToLong<T> |
orThrow()
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. |
default ToByteNullable<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 ToDoubleNullable<T> |
sqrt()
Creates and returns an expression that returns the square root of the
result from the current expression.
|
isNotNull, isNotNull, isNull, isNullcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongstatic <T> ToLongNullable<T> of(Function<T,Long> lambda)
ToLongNullable<T> using the provided
lambda.T - type to extract fromlambda - to convertToLongNullable<T> using the provided
lambdaNullPointerException - if the provided lambda is
nulldefault ExpressionType expressionType()
ExpressionexpressionType in interface Expression<T>default long applyAsLong(T object) throws NullPointerException
applyAsLong in interface ToLongFunction<T>NullPointerExceptiondefault ToLong<T> orThrow() throws NullPointerException
ToNullableNullPointerException if given an argument that would cause this
expression to return null.orThrow in interface ToNullable<T,Long,ToLong<T>>NullPointerExceptiondefault ToLong<T> orElseGet(ToLong<T> getter)
ToNullablegetter expression if given an argument that would cause this
expression to return null.default ToLong<T> orElse(Long value)
ToNullablevalue if given an argument that would cause this
expression to return null.default ToLongNullable<T> abs()
HasAbsabs in interface HasAbs<ToLongNullable<T>>default ToLongNullable<T> negate()
HasNegatenegate in interface HasNegate<ToLongNullable<T>>default ToByteNullable<T> sign()
HasSign1 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.
sign in interface HasSign<ToByteNullable<T>>default ToDoubleNullable<T> sqrt()
HasSqrt
If this expression is nullable and the result was null, then the
result of the returned expression will also be null.
sqrt in interface HasSqrt<ToDoubleNullable<T>>default ToDoubleNullable<T> mapToDoubleIfPresent(LongToDoubleFunction mapper)
HasMapToDoubleIfPresentdouble by passing it to
the specified mapper, producing a new expression that implements
ToDouble. If this expression would have evaluated to
null, then the new expression will as well.mapToDoubleIfPresent in interface HasMapToDoubleIfPresent<T,LongToDoubleFunction>mapper - the mapper to use on the result of this expressiondefault ToLongNullable<T> mapIfPresent(LongUnaryOperator mapper)
HasMapIfPresentmapIfPresent in interface HasMapIfPresent<T,LongUnaryOperator,ToLongNullable<T>>mapper - the mapping functiondefault long hash(T object)
HasHashdefault int compare(T first, T second)
compare in interface Comparator<T>compare in interface HasCompare<T>default <V> ToLongNullable<V> compose(Function<? super V,? extends T> before)
HasComposebefore
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.compose in interface Function<T,Long>compose in interface HasCompose<T>V - the type of input to the before function, and to the
composed expressionbefore - the function to apply before this function is appliedbefore
function and then applies this functionCopyright © 2019 Speedment, Inc.. All rights reserved.