|
Copyright 2008 - 2009 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg This software is released under an open source BSD licence. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfj.function.Booleans
public final class Booleans
Curried logical functions.
Field Summary | |
---|---|
static F<Boolean,F<Boolean,Boolean>> |
and
Curried form of logical "and" (conjunction). |
static F<Boolean,F<Boolean,Boolean>> |
if_
Curried form of logical "if" (reverse material implication). |
static F<Boolean,F<Boolean,Boolean>> |
iff
Curried form of logical "if and only if" (biconditional, equivalence). |
static F<Boolean,F<Boolean,Boolean>> |
implies
Curried form of logical "only if" (material implication). |
static F<Boolean,F<Boolean,Boolean>> |
nif
Curried form of logical "not if" (reverse nonimplication). |
static F<Boolean,F<Boolean,Boolean>> |
nimp
Curried form of logical "not implies" (nonimplication). |
static F<Boolean,F<Boolean,Boolean>> |
nor
Curried form of logical "not or". |
static F<Boolean,Boolean> |
not
Logical negation. |
static F<Boolean,F<Boolean,Boolean>> |
or
Curried form of logical "inclusive or" (disjunction). |
static F<Boolean,F<Boolean,Boolean>> |
xor
Curried form of logical xor (nonequivalence). |
Method Summary | ||
---|---|---|
static boolean |
and(List<Boolean> l)
Returns true if all the elements of the given list are true. |
|
static boolean |
and(Stream<Boolean> l)
Returns true if all the elements of the given stream are true. |
|
static
|
cond()
Curried form of conditional. |
|
static
|
not(F<A,Boolean> p)
Negates the given predicate. |
|
static boolean |
or(List<Boolean> l)
Returns true if any element of the given list is true. |
|
static boolean |
or(Stream<Boolean> l)
Returns true if any element of the given stream is true. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final F<Boolean,F<Boolean,Boolean>> or
public static final F<Boolean,F<Boolean,Boolean>> and
public static final F<Boolean,F<Boolean,Boolean>> xor
public static final F<Boolean,Boolean> not
public static final F<Boolean,F<Boolean,Boolean>> implies
public static final F<Boolean,F<Boolean,Boolean>> if_
public static final F<Boolean,F<Boolean,Boolean>> iff
public static final F<Boolean,F<Boolean,Boolean>> nimp
public static final F<Boolean,F<Boolean,Boolean>> nif
public static final F<Boolean,F<Boolean,Boolean>> nor
Method Detail |
---|
public static boolean and(List<Boolean> l)
l
- A list to check for all the elements being true.
public static boolean and(Stream<Boolean> l)
l
- A stream to check for all the elements being true.
public static boolean or(List<Boolean> l)
l
- A list to check for any element being true.
public static boolean or(Stream<Boolean> l)
l
- A stream to check for any element being true.
public static <A> F<A,Boolean> not(F<A,Boolean> p)
p
- A predicate to negate.
public static <A> F<Boolean,F<A,F<A,A>>> cond()
|
Copyright 2008 - 2009 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg This software is released under an open source BSD licence. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |