Class RelationToThreshold

Object
org.anchoranalysis.bean.AnchorBean<RelationToThreshold>
org.anchoranalysis.bean.shared.relation.threshold.RelationToThreshold
All Implemented Interfaces:
GenerateUniqueParameterization
Direct Known Subclasses:
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 Details

  • Method Details

    • threshold

      public abstract double threshold()
      The threshold-value.
      Returns:
      the value.
    • relation

      public abstract DoubleBiPredicate relation()
      The relation to the threshold.
      Returns:
      the predicate, where the threshold will form the second operand.
    • asPredicateDouble

      public DoublePredicate 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

      public IntPredicate asPredicateInt()
      Like asPredicateDouble() but expresses the relationship for an integer.
      Returns:
      a newly-created predicate that accepts an integer-value.