|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@Applicative public interface Predicate<A>
A rich Evaluable
| Method Summary | ||
|---|---|---|
Predicate<A> |
and(Evaluable<? super A> other)
Returns a predicate that performs a short-circuit logical-and between this Predicate's Evaluable.eval(Object) and other |
|
Predicate<A> |
andNotNull()
Returns a null-safe predicate that, when evaluated, answers false if its argument is null, or evaluates this predicate,
otherwise. |
|
Predicate<A> |
not()
Negates this Predicate |
|
|
of(Applicable<? super B,? extends A> other)
Composes this predicate with another Applicable, resulting in a new
Predicate that when applied returns
this.eval(other.apply(arg) |
|
Predicate<A> |
or(Evaluable<? super A> other)
Returns a predicate that, performs a short-circuit logical-or between this Predicate's Evaluable.eval(Object) and other |
|
Predicate<A> |
orNull()
Returns a null-safe predicate that, when evaluated, answers true if its argument is null, or evaluates this predicate,
otherwise. |
|
Predicate<A> |
withEffectOnFalse(Executable<A> executable)
Adds a a side effect to this predicate, that will be evaluated whenever the predicate evaluation is false |
|
Predicate<A> |
withEffectOnTrue(Executable<A> executable)
Adds a side effect to this predicate, that will be evaluated whenever the predicate evaluation is true |
|
| Methods inherited from interface net.sf.staccatocommons.defs.Evaluable |
|---|
eval |
| Methods inherited from interface net.sf.staccatocommons.defs.Applicable |
|---|
apply |
| Method Detail |
|---|
Predicate<A> not()
Predicate
Predicate that negates this Predicate's result.
Predicate<A> or(@NonNull
Evaluable<? super A> other)
Predicate's Evaluable.eval(Object) and other
other - another Evaluable. Non null.
Predicate<A> and(@NonNull
Evaluable<? super A> other)
Predicate's Evaluable.eval(Object) and other
other - another Evaluable. Non null.
@NullSafe Predicate<A> andNotNull()
false if its argument is null, or evaluates this predicate,
otherwise.
arg != null && this.eval(arg)@NullSafe Predicate<A> orNull()
true if its argument is null, or evaluates this predicate,
otherwise.
arg == null || this.eval(arg)Predicate<A> withEffectOnTrue(Executable<A> executable)
true
executable -
Executable effect to thisPredicate<A> withEffectOnFalse(Executable<A> executable)
false
executable -
Executable effect to this
<B> Predicate<B> of(@NonNull
Applicable<? super B,? extends A> other)
Applicable, resulting in a new
Predicate that when applied returns
this.eval(other.apply(arg)
B - other -
this composed with other
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||