|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.jbp.common.logic.BooleanFunctions
public class BooleanFunctions
Provides various boolean-valued methods.
| Method Summary | |
|---|---|
static boolean |
conjunction(boolean... predicatesParam)
Returns true if all specified predicates are
true. |
static boolean |
disjunction(boolean... predicatesParam)
Returns true if at least on specified predicate is
true. |
static boolean |
equivalent(boolean... predicatesParam)
Checks for predicate equivalence. |
static boolean |
exclusiveDisjunction(boolean firstPredicateParam,
boolean secondPredicateParam)
Checks that exactly one predicate is true. |
static boolean |
majority(boolean... predicatesParam)
Checks that strictly more than half of the specified predicates are true. |
static boolean |
nand(boolean firstPredicateParam,
boolean secondPredicateParam)
Checks that both specified predicates are not simultaneously true. |
static boolean |
nor(boolean firstPredicateParam,
boolean secondPredicateParam)
Returns true if both specified predicates are simultaneously
false. |
static boolean[] |
not(boolean... predicatesParam)
Returns an array with the opposites of the specified predicates. |
static boolean |
not(boolean predicateParam)
Returns the opposite of the specified predicate. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean conjunction(boolean... predicatesParam)
true if all specified predicates are
true.
predicatesParam - The specified predicates.public static boolean disjunction(boolean... predicatesParam)
true if at least on specified predicate is
true.
predicatesParam - The specified predicates.public static boolean equivalent(boolean... predicatesParam)
predicatesParam - The specified predicates.
true if all specified predicates are equivalent,
false else.
public static boolean exclusiveDisjunction(boolean firstPredicateParam,
boolean secondPredicateParam)
true.
firstPredicateParam - The first predicate.secondPredicateParam - The second predicate.
true if exactly one specified predicate is
true.public static boolean majority(boolean... predicatesParam)
true.
predicatesParam - The specified predicates.
true if strictly more than half of the specified
predicates are true, false else.
public static boolean nand(boolean firstPredicateParam,
boolean secondPredicateParam)
true.
firstPredicateParam - The first specified predicate.secondPredicateParam - The second specified predicate.
true if both specified predicates are not
simultaneously true, false else.
public static boolean nor(boolean firstPredicateParam,
boolean secondPredicateParam)
true if both specified predicates are simultaneously
false.
firstPredicateParam - The first specified predicate.secondPredicateParam - The second specified predicate.
true if both specified predicates are simultaneously
false, false else.public static boolean not(boolean predicateParam)
predicateParam - The specified predicate.
true if the specified predicate is
false or false if it's
true.public static boolean[] not(boolean... predicatesParam)
predicatesParam - The specified predicates.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||