public abstract class Condition extends java.lang.Object implements Predicate, java.io.Serializable
Attribute satisfies a certain condition.
This class implements the method Predicate.test(Object) to check whether an example
(given as an AttributeMap) satisfies a condition or not.
| Constructor and Description |
|---|
Condition(@NotNull Attribute attribute,
double value)
creates a new condition.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
@NotNull Attribute |
getAttribute()
Returns the attribute, the condition corresponds to.
|
double |
getValue()
Returns the value of the condition.
|
int |
hashCode() |
boolean |
test(@NotNull AttributeMap attributeMap) |
protected abstract boolean |
testValue(double value)
The method that must be overridden by implementing subclasses in order to check whether a
specific value satisfies the condition or not.
|
public Condition(@NotNull
@NotNull Attribute attribute,
double value)
attribute - The attribute, the condition corresponds tovalue - The value of the conditionprotected abstract boolean testValue(double value)
value - The value that should be checked@NotNull public final @NotNull Attribute getAttribute()
public final double getValue()
public boolean test(@NotNull
@NotNull AttributeMap attributeMap)
test in interface java.util.function.Predicate<AttributeMap>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object