Class CompoundCondition
java.lang.Object
adaa.analytics.rules.logic.representation.condition.ConditionBase
adaa.analytics.rules.logic.representation.condition.CompoundCondition
- All Implemented Interfaces:
Serializable
,Cloneable
Class representing a compound condition.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class adaa.analytics.rules.logic.representation.condition.ConditionBase
ConditionBase.Type
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected LogicalOperator
Logical operator which joins subconditions.protected List<ConditionBase>
Collection of subconditions.Fields inherited from class adaa.analytics.rules.logic.representation.condition.ConditionBase
covering, disabled, type
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a subcondition.clone()
boolean
Verifies whether the condition is equal to another one.Gets a collection of attributes the condition is built upon.Getssubconditions
.int
hashCode()
Calculates object hash code.protected void
internalEvaluate
(IExampleSet set, Set<Integer> outIndices) Evaluates the condition on a specified dataset.protected boolean
Evaluates the condition on a given example.void
Removes a subcondition.void
setLogicalOperator
(LogicalOperator operator) Setsoperator
.toString()
Generates a text representation of the condition.Methods inherited from class adaa.analytics.rules.logic.representation.condition.ConditionBase
evaluate, evaluate, getCovering, getType, isDisabled, isPrunable, setCovering, setDisabled, setType
-
Field Details
-
subconditions
Collection of subconditions. -
operator
Logical operator which joins subconditions.
-
-
Constructor Details
-
CompoundCondition
public CompoundCondition()
-
-
Method Details
-
setLogicalOperator
Setsoperator
. -
getSubconditions
Getssubconditions
. -
addSubcondition
Adds a subcondition.- Parameters:
cnd
- A subcondition to be added.
-
removeSubcondition
Removes a subcondition.- Parameters:
cnd
- Subcondition to be removed.
-
internalEvaluate
Evaluates the condition on a given example.- Specified by:
internalEvaluate
in classConditionBase
- Parameters:
ex
- Example to be examined.- Returns:
- Logical value indicating whether the example fulfills the condition.
-
internalEvaluate
Evaluates the condition on a specified dataset.- Specified by:
internalEvaluate
in classConditionBase
- Parameters:
set
- Input dataset.outIndices
- Output set of indices covered by the condition.
-
toString
Generates a text representation of the condition. -
equals
Verifies whether the condition is equal to another one.- Specified by:
equals
in classConditionBase
- Parameters:
obj
- Reference object.- Returns:
- Logical value indicating whether conditions are equal.
-
hashCode
public int hashCode()Calculates object hash code. -
getAttributes
Gets a collection of attributes the condition is built upon.- Specified by:
getAttributes
in classConditionBase
- Returns:
- Set of attributes.
-
clone
- Specified by:
clone
in classConditionBase
-