public static class PredicateN.Instance extends java.lang.Object implements AbstractPredicateN<PredicateN.Instance>
AbstractPredicateN which properly defines the
arity and type of that particular predicate.AbstractPredicateN| Constructor and Description |
|---|
Instance(int arity,
Predicate1<java.lang.Object[]> predicate)
Constructs an instance of the predicate.
|
| Modifier and Type | Method and Description |
|---|---|
PredicateN.Instance |
and(PredicateN.Instance other)
Intersects this object with another object to produce a combined result.
|
<V> net.ashwork.functionality.FunctionN.Instance<V> |
andThen(net.ashwork.functionality.Function1<? super java.lang.Boolean,? extends V> after) |
<V> net.ashwork.functionality.FunctionN.Instance<V> |
andThenUnchecked(net.ashwork.functionality.Function1<? super java.lang.Boolean,? extends V> after) |
int |
arity() |
PredicateN.Instance |
nand(PredicateN.Instance other)
Intersects this object with another object to produce the complement of a combined result.
|
PredicateN.Instance |
nor(PredicateN.Instance other)
Unions this object with another object to produce the complement of a combined result.
|
PredicateN.Instance |
not()
Gets the complement of this object.
|
PredicateN.Instance |
or(PredicateN.Instance other)
Unions this object with another object to produce a combined result.
|
PredicateN.Instance |
orNot(PredicateN.Instance other)
Subtracts the other object from this object to produce the complement of a combined result.
|
PredicateN.Instance |
sub(PredicateN.Instance other)
Subtracts the other object from this object to produce a combined result.
|
boolean |
testAllUnchecked(java.lang.Object... args)
Evaluates this predicate on the given arguments.
|
PredicateN.Instance |
xnor(PredicateN.Instance other)
Disjunctively unions this object with another object to produce the complement of a combined result.
|
PredicateN.Instance |
xor(PredicateN.Instance other)
Disjunctively unions this object with another object to produce a combined result.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplyAllAsBooleanUncheckedpublic Instance(int arity,
Predicate1<java.lang.Object[]> predicate)
arity - the number of arguments of the predicatepredicate - the predicate to be appliedpublic int arity()
arity in interface net.ashwork.functionality.FunctionN<java.lang.Boolean>arity in interface net.ashwork.functionality.partial.Aritypublic boolean testAllUnchecked(java.lang.Object... args)
AbstractPredicateNtestAllUnchecked in interface AbstractPredicateN<PredicateN.Instance>args - the input argumentstrue if the input arguments match the predicate, otherwise
falsepublic <V> net.ashwork.functionality.FunctionN.Instance<V> andThen(net.ashwork.functionality.Function1<? super java.lang.Boolean,? extends V> after)
andThen in interface net.ashwork.functionality.FunctionN<java.lang.Boolean>andThen in interface net.ashwork.functionality.partial.ResultChainable<java.lang.Boolean>andThen in interface net.ashwork.functionality.partial.ResultChainableResult<java.lang.Boolean>FunctionN.Instancepublic <V> net.ashwork.functionality.FunctionN.Instance<V> andThenUnchecked(net.ashwork.functionality.Function1<? super java.lang.Boolean,? extends V> after)
andThenUnchecked in interface net.ashwork.functionality.FunctionN<java.lang.Boolean>andThenUnchecked in interface net.ashwork.functionality.partial.ResultChainable<java.lang.Boolean>andThenUnchecked in interface net.ashwork.functionality.partial.ResultChainableResult<java.lang.Boolean>FunctionN.Instancepublic PredicateN.Instance not()
Not~A or a logical NOT.not in interface AbstractPredicateN<PredicateN.Instance>not in interface LogicalOperator<PredicateN.Instance>not in interface Nand<PredicateN.Instance>not in interface Nor<PredicateN.Instance>not in interface Notnot in interface OrNot<PredicateN.Instance>not in interface Sub<PredicateN.Instance>not in interface Xnor<PredicateN.Instance>not in interface Xor<PredicateN.Instance>public PredicateN.Instance and(PredicateN.Instance other)
AndA & B or a logical AND.and in interface AbstractPredicateN<PredicateN.Instance>and in interface And<PredicateN.Instance>and in interface LogicalOperator<PredicateN.Instance>and in interface Nand<PredicateN.Instance>and in interface Sub<PredicateN.Instance>and in interface Xnor<PredicateN.Instance>and in interface Xor<PredicateN.Instance>other - the intersected objectother objectpublic PredicateN.Instance or(PredicateN.Instance other)
OrA | B or a logical OR.or in interface AbstractPredicateN<PredicateN.Instance>or in interface LogicalOperator<PredicateN.Instance>or in interface Nor<PredicateN.Instance>or in interface Or<PredicateN.Instance>or in interface OrNot<PredicateN.Instance>or in interface Xnor<PredicateN.Instance>or in interface Xor<PredicateN.Instance>other - the unioned objectother objectpublic PredicateN.Instance xor(PredicateN.Instance other)
XorA ^ B or a logical XOR.xor in interface AbstractPredicateN<PredicateN.Instance>xor in interface LogicalOperator<PredicateN.Instance>xor in interface Xnor<PredicateN.Instance>xor in interface Xor<PredicateN.Instance>other - the disjunctively unioned objectother objectpublic PredicateN.Instance sub(PredicateN.Instance other)
SubA - B or the relative complement.sub in interface AbstractPredicateN<PredicateN.Instance>sub in interface LogicalOperator<PredicateN.Instance>sub in interface Sub<PredicateN.Instance>sub in interface Xnor<PredicateN.Instance>sub in interface Xor<PredicateN.Instance>other - the subtrahend objectother object being
subtracted from this objectpublic PredicateN.Instance nand(PredicateN.Instance other)
Nand~(A & B) or a logical NAND.nand in interface AbstractPredicateN<PredicateN.Instance>nand in interface LogicalOperator<PredicateN.Instance>nand in interface Nand<PredicateN.Instance>other - the intersected objectother objectpublic PredicateN.Instance nor(PredicateN.Instance other)
Nor~(A | B) or a logical NOR.nor in interface AbstractPredicateN<PredicateN.Instance>nor in interface LogicalOperator<PredicateN.Instance>nor in interface Nor<PredicateN.Instance>other - the unioned objectother objectpublic PredicateN.Instance xnor(PredicateN.Instance other)
Xnor~(A ^ B) or a logical XNOR.xnor in interface AbstractPredicateN<PredicateN.Instance>xnor in interface LogicalOperator<PredicateN.Instance>xnor in interface Xnor<PredicateN.Instance>other - the disjunctively unioned objectother objectpublic PredicateN.Instance orNot(PredicateN.Instance other)
OrNot~(A - B) or the complement of the relative complement.orNot in interface AbstractPredicateN<PredicateN.Instance>orNot in interface LogicalOperator<PredicateN.Instance>orNot in interface OrNot<PredicateN.Instance>other - the subtrahend objectother
object being subtracted from this object