public class Body extends ConditionSet implements Proposition<Condition>
Rule. It may consist of several Conditions that are
either concatenated using logical AND operators (conjunctive rule) or using logical OR operators
(disjunctive rule).
This class implements the method Predicate.test(Object) to check whether the body is
satisfied by an example (given as an AttributeMap) or not.
| Constructor and Description |
|---|
Body()
Creates an empty body, whose conditions are concatenated using conjunctions.
|
Body(boolean conjunctive)
Creates an empty body, whose conditions are concatenated using either conjunctions or
disjunctions.
|
Body(boolean conjunctive,
Condition... conditions)
Creates a new body that consists of several conditions that are concatenated using either
conjunctions or disjunctions.
|
Body(boolean conjunctive,
@NotNull java.lang.Iterable<? extends Condition> conditions)
Creates a new body that consists of several conditions that are concatenated using either
conjunctions or disjunctions.
|
Body(Condition... conditions)
Creates a new body that consists of several conditions that are concatenated using
conjunctions.
|
Body(@NotNull java.lang.Iterable<? extends Condition> conditions)
Creates a new body that consists of several conditions that are concatenated using
conjunctions.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
boolean |
isConjunctive()
Returns, whether the proposition is conjunctive, or not.
|
java.lang.String |
toString() |
add, addAll, clear, contains, containsAll, get, get, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAllMatches, getFirstMatch, isDisjunctive, testpublic Body()
public Body(boolean conjunctive)
conjunctive - True, if the conditions should be concatenated using conjunctions, false,
if they should be concatenated using disjunctionspublic Body(@NotNull
Condition... conditions)
conditions - An array that contains the conditions, the body should consist ofpublic Body(boolean conjunctive,
@NotNull
Condition... conditions)
conjunctive - True, if the conditions should be concatenated using conjunctions, false,
if they should be concatenated using disjunctionsconditions - An array that contains the conditions, the body should consist ofpublic Body(@NotNull
@NotNull java.lang.Iterable<? extends Condition> conditions)
conditions - An Iterable that allows to iterate the conditions, the body should
consist ofpublic Body(boolean conjunctive,
@NotNull
@NotNull java.lang.Iterable<? extends Condition> conditions)
conjunctive - True, if the conditions should be concatenated using conjunctions, false,
if they should be concatenated using disjunctionsconditions - An Iterable that allows to iterate the conditions, the body should
consist ofpublic boolean isConjunctive()
PropositionisConjunctive in interface Proposition<Condition>public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in interface java.util.Collection<Condition>hashCode in interface java.util.Set<Condition>hashCode in class ConditionSetpublic boolean equals(java.lang.Object obj)
equals in interface java.util.Collection<Condition>equals in interface java.util.Set<Condition>equals in class ConditionSet