|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.myjavatools.lib.human.Logical
public abstract class Logical
Logical is a class that represents a multivalued logic the mathematical notion of function: X -> Y. To implement a function, you need to define method apply(): Y y = function.apply(X x).
Filter
,
Maps
,
Map
Nested Class Summary | |
---|---|
static class |
Logical.LogicalConstant
|
Constructor Summary | |
---|---|
Logical()
|
Method Summary | ||
---|---|---|
static Logical.LogicalConstant |
and(Logical.LogicalConstant a,
Logical.LogicalConstant b)
Conjunction of two logical values |
|
static
|
and(Predicate<T> f,
Predicate<T> g)
Conjunction of two predicates |
|
static Logical.LogicalConstant |
not(Logical.LogicalConstant a)
Negation of a logical value |
|
static
|
not(Predicate<T> f)
Negation of a predicate |
|
static Logical.LogicalConstant |
or(Logical.LogicalConstant a,
Logical.LogicalConstant b)
Disjunction of two logical values |
|
static
|
or(Predicate<T> f,
Predicate<T> g)
Disjunction of two predicates |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Logical()
Method Detail |
---|
public static Logical.LogicalConstant and(Logical.LogicalConstant a, Logical.LogicalConstant b)
a
- LogicalConstantb
- LogicalConstant
public static Logical.LogicalConstant or(Logical.LogicalConstant a, Logical.LogicalConstant b)
a
- LogicalConstantb
- LogicalConstant
public static Logical.LogicalConstant not(Logical.LogicalConstant a)
a
- LogicalConstant
public static <T> Predicate<T> and(Predicate<T> f, Predicate<T> g)
f
- Predicateg
- Predicatepublic static <T> Predicate<T> or(Predicate<T> f, Predicate<T> g)
f
- Predicateg
- Predicatepublic static <T> Predicate<T> not(Predicate<T> f)
f
- Predicate
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |