Class RelationToThreshold

Object
AnchorBean<RelationToThreshold>
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 Details

    • RelationToThreshold

      public RelationToThreshold()
  • 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.