|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object org.op4j.functions.FnBoolean
public final class FnBoolean
Method Summary | ||
---|---|---|
static
|
and(IFunction<X,Boolean> left,
IFunction<? super R,Boolean> right)
Takes two boolean functions (Function<? |
|
static Function<Object,Boolean> |
eq(boolean object)
Determines whether the target object and the specified object are equal by calling the equals method on the target object. |
|
static Function<Object,Boolean> |
eq(Boolean object)
Determines whether the target object and the specified object are equal by calling the equals method on the target object. |
|
static
|
eqBy(IFunction<X,?> by,
boolean object)
Determines whether the result of executing the specified function on the target object and the specified object parameter are equal by calling the equals method. |
|
static
|
eqBy(IFunction<X,?> by,
Boolean object)
Determines whether the result of executing the specified function on the target object and the specified object parameter are equal by calling the equals method. |
|
static Function<Boolean,Boolean> |
isFalse()
Returns true if the target object is Boolean.FALSE, false if it is Boolean.TRUE. |
|
static Function<Object,Boolean> |
isNotNull()
Determines whether the target object is null or not. |
|
static
|
isNotNullBy(IFunction<X,?> by)
Determines whether the result of executing the specified function on the target object is null or not. |
|
static Function<Object,Boolean> |
isNull()
Determines whether the target object is null or not. |
|
static
|
isNullBy(IFunction<X,?> by)
Determines whether the result of executing the specified function on the target object is null or not. |
|
static Function<Boolean,Boolean> |
isTrue()
Returns true if the target object is Boolean.TRUE, false if it is Boolean.FALSE. |
|
static Function<Boolean,Boolean> |
negate()
Negates the target Boolean, returning Boolean.FALSE if the target object is Boolean.TRUE, and Boolean.TRUE if it is Boolean.FALSE. |
|
static
|
not(IFunction<T,Boolean> function)
Takes a boolean function (Function<? |
|
static Function<Object,Boolean> |
notEq(boolean object)
Determines whether the target object and the specified object are NOT equal by calling the equals method on the target object. |
|
static Function<Object,Boolean> |
notEq(Boolean object)
Determines whether the target object and the specified object are NOT equal by calling the equals method on the target object. |
|
static
|
notEqBy(IFunction<X,?> by,
boolean object)
Determines whether the result of executing the specified function on the target object and the specified object parameter are NOT equal by calling the equals method. |
|
static
|
notEqBy(IFunction<X,?> by,
Boolean object)
Determines whether the result of executing the specified function on the target object and the specified object parameter are NOT equal by calling the equals method. |
|
static
|
or(IFunction<X,Boolean> left,
IFunction<? super R,Boolean> right)
Takes two boolean functions (Function<? |
|
static Function<Boolean,BigDecimal> |
toBigDecimal()
Converts a Boolean to a BigDecimal. true = 1, false = 0. |
|
static Function<Boolean,BigInteger> |
toBigInteger()
Converts a Boolean to a BigInteger. true = 1, false = 0. |
|
static Function<Boolean,Byte> |
toByte()
Converts a Boolean to a Byte. true = 1, false = 0. |
|
static Function<Boolean,Double> |
toDouble()
Converts a Boolean to a Double. true = 1, false = 0. |
|
static Function<Boolean,Float> |
toFloat()
Converts a Boolean to a Float. true = 1, false = 0. |
|
static Function<Boolean,Integer> |
toInteger()
Converts a Boolean to a Integer. true = 1, false = 0. |
|
static Function<Boolean,Long> |
toLong()
Converts a Boolean to a Long. true = 1, false = 0. |
|
static Function<Boolean,Short> |
toShort()
Converts a Boolean to a Short. true = 1, false = 0. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static final Function<Boolean,BigDecimal> toBigDecimal()
Converts a Boolean to a BigDecimal. true = 1, false = 0.
public static final Function<Boolean,BigInteger> toBigInteger()
Converts a Boolean to a BigInteger. true = 1, false = 0.
public static final Function<Boolean,Double> toDouble()
Converts a Boolean to a Double. true = 1, false = 0.
public static final Function<Boolean,Float> toFloat()
Converts a Boolean to a Float. true = 1, false = 0.
public static final Function<Boolean,Long> toLong()
Converts a Boolean to a Long. true = 1, false = 0.
public static final Function<Boolean,Integer> toInteger()
Converts a Boolean to a Integer. true = 1, false = 0.
public static final Function<Boolean,Short> toShort()
Converts a Boolean to a Short. true = 1, false = 0.
public static final Function<Boolean,Byte> toByte()
Converts a Boolean to a Byte. true = 1, false = 0.
public static final Function<Boolean,Boolean> negate()
Negates the target Boolean, returning Boolean.FALSE if the target object is Boolean.TRUE, and Boolean.TRUE if it is Boolean.FALSE.
public static final Function<Object,Boolean> eq(Boolean object)
Determines whether the target object and the specified object are equal by calling the equals method on the target object.
object
- the object to compare to the target
public static final Function<Object,Boolean> eq(boolean object)
Determines whether the target object and the specified object are equal by calling the equals method on the target object.
object
- the object to compare to the target
public static final Function<Object,Boolean> notEq(Boolean object)
Determines whether the target object and the specified object are NOT equal by calling the equals method on the target object.
object
- the object to compare to the target
public static final Function<Object,Boolean> notEq(boolean object)
Determines whether the target object and the specified object are NOT equal by calling the equals method on the target object.
object
- the object to compare to the target
public static final <X> Function<X,Boolean> eqBy(IFunction<X,?> by, Boolean object)
Determines whether the result of executing the specified function on the target object and the specified object parameter are equal by calling the equals method.
object
- the object to compare to the target
public static final <X> Function<X,Boolean> eqBy(IFunction<X,?> by, boolean object)
Determines whether the result of executing the specified function on the target object and the specified object parameter are equal by calling the equals method.
object
- the object to compare to the target
public static final <X> Function<X,Boolean> notEqBy(IFunction<X,?> by, Boolean object)
Determines whether the result of executing the specified function on the target object and the specified object parameter are NOT equal by calling the equals method.
object
- the object to compare to the target
public static final <X> Function<X,Boolean> notEqBy(IFunction<X,?> by, boolean object)
Determines whether the result of executing the specified function on the target object and the specified object parameter are NOT equal by calling the equals method.
object
- the object to compare to the target
public static final Function<Boolean,Boolean> isTrue()
Returns true if the target object is Boolean.TRUE, false if it is Boolean.FALSE.
public static final Function<Boolean,Boolean> isFalse()
Returns true if the target object is Boolean.FALSE, false if it is Boolean.TRUE.
public static final <X,R extends X> Function<R,Boolean> and(IFunction<X,Boolean> left, IFunction<? super R,Boolean> right)
Takes two boolean functions (Function<?,Boolean>) as parameters and returns another one which returns true if both functions return true, and false if not.
left
- the left side of the "and" operationright
- the right side of the "and" operation
public static final <X,R extends X> Function<R,Boolean> or(IFunction<X,Boolean> left, IFunction<? super R,Boolean> right)
Takes two boolean functions (Function<?,Boolean>) as parameters and returns another one which returns true if any of the functions returns true, and false if not.
left
- the left side of the "or" operationright
- the right side of the "or" operation
public static final <T> Function<T,Boolean> not(IFunction<T,Boolean> function)
Takes a boolean function (Function<?,Boolean>) as a parameter and returns another one which returns true if the specified function returns false, and false if the function returns true.
function
- the function to be negated
public static final Function<Object,Boolean> isNull()
Determines whether the target object is null or not.
public static final Function<Object,Boolean> isNotNull()
Determines whether the target object is null or not.
public static final <X> Function<X,Boolean> isNullBy(IFunction<X,?> by)
Determines whether the result of executing the specified function on the target object is null or not.
public static final <X> Function<X,Boolean> isNotNullBy(IFunction<X,?> by)
Determines whether the result of executing the specified function on the target object is null or not.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |