T
- type to extract fromR
- return typeNON_NULLABLE
- the expression type obtained if the nullability of
this expression is handledpublic interface ToNullable<T,R,NON_NULLABLE extends Expression<T>> extends Function<T,R>, Expression<T>
null
-values.Modifier and Type | Method and Description |
---|---|
default IsNotNull<T,R> |
isNotNull()
Returns a
Predicate that is false for any values that
would make this expression return null and true for any
values that would make this expression return a result. |
default boolean |
isNotNull(T object)
Returns
false if the specified object would cause this methods
Function.apply(Object) -method to return null , and otherwise
true . |
default IsNull<T,R> |
isNull()
Returns a
Predicate that is true for any values that
would make this expression return null and false for any
values that would make this expression return a result. |
default boolean |
isNull(T object)
Returns
true if the specified object would cause this methods
Function.apply(Object) -method to return null , and otherwise
false . |
NON_NULLABLE |
orElse(R 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 . |
NON_NULLABLE |
orElseGet(NON_NULLABLE 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 . |
NON_NULLABLE |
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 . |
expressionType
default IsNull<T,R> isNull()
Predicate
that is true
for any values that
would make this expression return null
and false
for any
values that would make this expression return a result.null
default IsNotNull<T,R> isNotNull()
Predicate
that is false
for any values that
would make this expression return null
and true
for any
values that would make this expression return a result.null
default boolean isNull(T object)
true
if the specified object would cause this methods
Function.apply(Object)
-method to return null
, and otherwise
false
.object
- the incoming entity to test ontrue
if the expression would return null
,
else false
default boolean isNotNull(T object)
false
if the specified object would cause this methods
Function.apply(Object)
-method to return null
, and otherwise
true
.object
- the incoming entity to test onfalse
if the expression would return null
,
else true
NON_NULLABLE orThrow()
NullPointerException
if given an argument that would cause this
expression to return null
.NON_NULLABLE orElseGet(NON_NULLABLE getter)
getter
expression if given an argument that would cause this
expression to return null
.getter
- to apply if nullgetter
NON_NULLABLE orElse(R value)
value
if given an argument that would cause this
expression to return null
.value
- value to use if nullvalue
Copyright © 2019 Speedment, Inc.. All rights reserved.