List of utility methods to do Boolean And
boolean | and(boolean a, boolean b) and return a && b;
|
boolean | and(boolean b1, boolean b2) Concatenate two booleans with the operation "AND" return b1 && b2;
|
boolean | and(boolean val1, boolean val2) Returns (val1 && val2). return val1 && val2; |
boolean | and(boolean... bools) An and gate boolean total = true; for (boolean bool : bools) total = total && bool; return total; |
boolean | and(boolean... bs) and boolean r = true; for (boolean b : bs) { r = b && r; return r; |
Boolean | and(Boolean... operands) n-ary and that ignores null values. Boolean result = null; for (Boolean operand : operands) { if (operand == null) { continue; if (!operand) { return false; result = true; return result; |
Boolean | andBoolOperand(Boolean o, Boolean a) And 2 Boolean operands in the context of pruning match Operand one|Operand another | And result unknown | T | unknown unknown | F | F unknown | unknown | unknown T | T | T T | F | F T | unknown | unknown F | T | F F | F | F F | unknown | F if (o == null) { if ((a == null) || a) { return null; } else { return a; } else if (a == null) { return o ? null : Boolean.FALSE; ... |