Class RelationToConstant
- All Implemented Interfaces:
GenerateUniqueParameterization
Defines a constant threshold, and a relation to it.
This is useful to distinguish between different ways to threshold a range of numbers e.g.
>= 7 or < 5.
The threshold will always form the second-operand in the relation.
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionRelationToConstant(RelationBean relation, double threshold) Creates a newRelationToConstantinstance. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe relation to the threshold, where the threshold forms the second operand.doubleThe constant threshold.inthashCode()relation()The relation to the threshold.voidsetRelation(RelationBean relation) The relation to the threshold, where the threshold forms the second operand.voidsetThreshold(double threshold) The constant threshold.doubleThe threshold-value.toString()Methods inherited from class org.anchoranalysis.bean.shared.relation.threshold.RelationToThreshold
asPredicateDouble, asPredicateIntMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise
-
Constructor Details
-
RelationToConstant
public RelationToConstant()
-
-
Method Details
-
threshold
public double threshold()Description copied from class:RelationToThresholdThe threshold-value.- Specified by:
thresholdin classRelationToThreshold- Returns:
- the value.
-
relation
Description copied from class:RelationToThresholdThe relation to the threshold.- Specified by:
relationin classRelationToThreshold- Returns:
- the predicate, where the threshold will form the second operand.
-
toString
- Overrides:
toStringin classAnchorBean<RelationToThreshold>
-
uniqueName
-
equals
- Specified by:
equalsin interfaceGenerateUniqueParameterization- Overrides:
equalsin classObject
-
canEqual
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceGenerateUniqueParameterization- Overrides:
hashCodein classObject
-
getRelation
The relation to the threshold, where the threshold forms the second operand. -
getThreshold
public double getThreshold()The constant threshold. -
setThreshold
public void setThreshold(double threshold) The constant threshold.
-