Class RelationToThreshold
- All Implemented Interfaces:
GenerateUniqueParameterization
- Direct Known Subclasses:
BinaryVoxelsBase,RelationToConstant
public abstract class RelationToThreshold
extends AnchorBean<RelationToThreshold>
implements GenerateUniqueParameterization
A base class specifying a threshold and a relation to it.
Together this forms a predicate, that can be compared against a value.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExpresses the relation as a predicate on values, where only values that fulfill the relation to threshold are true.LikeasPredicateDouble()but expresses the relationship for an integer.abstract DoubleBiPredicaterelation()The relation to the threshold.abstract doubleThe threshold-value.Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.anchoranalysis.bean.GenerateUniqueParameterization
equals, hashCode, uniqueName
-
Constructor Details
-
RelationToThreshold
public RelationToThreshold()
-
-
Method Details
-
threshold
public abstract double threshold()The threshold-value.- Returns:
- the value.
-
relation
The relation to the threshold.- Returns:
- the predicate, where the threshold will form the second operand.
-
asPredicateDouble
Expresses the relation as a predicate on values, where only values that fulfill the relation to threshold are true.- Returns:
- a newly-created predicate that accepts an double-value.
-
asPredicateInt
LikeasPredicateDouble()but expresses the relationship for an integer.- Returns:
- a newly-created predicate that accepts an integer-value.
-