T - type to extract from@FunctionalInterface public interface ToBooleanNullable<T> extends Expression<T>, com.speedment.common.function.ToBooleanFunction<T>, ToNullable<T,Boolean,ToBoolean<T>>, HasMapToDoubleIfPresent<T,com.speedment.common.function.BooleanToDoubleFunction>, HasMapIfPresent<T,com.speedment.common.function.BooleanUnaryOperator,ToBooleanNullable<T>>, HasHash<T>, HasCompare<T>, HasCompose<T>
boolean value, or
null. This expression can be implemented using a lambda, 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 boolean |
applyAsBoolean(T object)
Applies this function to the given argument.
|
default int |
compare(T first,
T second) |
default <V> ToBooleanNullable<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 ToBooleanNullable<T> |
mapIfPresent(com.speedment.common.function.BooleanUnaryOperator mapper)
Returns an expression for the value of this expression mapped using the
specified mapping function.
|
default ToDoubleNullable<T> |
mapToDoubleIfPresent(com.speedment.common.function.BooleanToDoubleFunction mapper)
Maps the result of this expression into a
double by passing it to
the specified mapper, producing a new expression that implements
ToDouble. |
static <T> ToBooleanNullable<T> |
of(Function<T,Boolean> lambda)
Returns a typed
ToBooleanNullable<T> using the provided
lambda. |
default ToBoolean<T> |
orElse(Boolean 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 ToBoolean<T> |
orElseGet(ToBoolean<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 ToBoolean<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. |
isNotNull, isNotNull, isNull, isNullcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongstatic <T> ToBooleanNullable<T> of(Function<T,Boolean> lambda)
ToBooleanNullable<T> using the provided
lambda.T - type to extract fromlambda - to convertToBooleanNullable<T> using the provided
lambdaNullPointerException - if the provided lambda is
nulldefault ExpressionType expressionType()
ExpressionexpressionType in interface Expression<T>default boolean applyAsBoolean(T object) throws NullPointerException
com.speedment.common.function.ToBooleanFunctionapplyAsBoolean in interface com.speedment.common.function.ToBooleanFunction<T>object - the argumentNullPointerExceptiondefault ToBoolean<T> orThrow() throws NullPointerException
ToNullableNullPointerException if given an argument that would cause this
expression to return null.orThrow in interface ToNullable<T,Boolean,ToBoolean<T>>NullPointerExceptiondefault ToBoolean<T> orElseGet(ToBoolean<T> getter)
ToNullablegetter expression if given an argument that would cause this
expression to return null.default ToBoolean<T> orElse(Boolean value)
ToNullablevalue if given an argument that would cause this
expression to return null.default ToDoubleNullable<T> mapToDoubleIfPresent(com.speedment.common.function.BooleanToDoubleFunction 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,com.speedment.common.function.BooleanToDoubleFunction>mapper - the mapper to use on the result of this expressiondefault ToBooleanNullable<T> mapIfPresent(com.speedment.common.function.BooleanUnaryOperator mapper)
HasMapIfPresentmapIfPresent in interface HasMapIfPresent<T,com.speedment.common.function.BooleanUnaryOperator,ToBooleanNullable<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> ToBooleanNullable<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,Boolean>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.