Class RelationToConstant
Object
org.anchoranalysis.bean.AnchorBean<RelationToThreshold>
org.anchoranalysis.bean.shared.relation.threshold.RelationToThreshold
org.anchoranalysis.bean.shared.relation.threshold.RelationToConstant
- All Implemented Interfaces:
GenerateUniqueParameterization
public class RelationToConstant extends RelationToThreshold
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
Constructors Constructor Description RelationToConstant()RelationToConstant(RelationBean relation, double threshold) -
Method Summary
Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)RelationBeangetRelation()The relation to the threshold, where the threshold forms the second operand.doublegetThreshold()The constant threshold.inthashCode()DoubleBiPredicaterelation()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.doublethreshold()The threshold-value.StringtoString()StringuniqueName()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() -
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. -
setRelation
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.
-