java.lang.Object
io.github.romanhaendler.rbed.Expression
Direct Known Subclasses:
ChannelExpression, EventCount

public abstract class Expression extends Object
A numeric value derived from the current Sample; undefined while the data it needs is not available. A Channel is one; others derive from it or come from Conditions.
  • Method Details

    • above

      public Condition above(double limit)
      True when this value is strictly greater than limit.
    • above

      public Condition above(Expression other)
      True when this value is strictly greater than other.
    • below

      public Condition below(double limit)
      True when this value is strictly less than limit.
    • below

      public Condition below(Expression other)
      True when this value is strictly less than other.
    • between

      public Condition between(double low, double high)
      True when low <= value <= high.
    • plus

      public Expression plus(Expression other)
      This value plus other.
    • plus

      public Expression plus(double c)
      This value plus c.
    • minus

      public Expression minus(Expression other)
      This value minus other.
    • minus

      public Expression minus(double c)
      This value minus c.
    • times

      public Expression times(Expression other)
      This value times other.
    • times

      public Expression times(double c)
      This value times c.
    • dividedBy

      public Expression dividedBy(Expression other)
      This value divided by other; undefined when other is 0.
    • dividedBy

      public Expression dividedBy(double c)
      This value divided by c; undefined when c is 0.
    • abs

      public Expression abs()
      The absolute value.
    • toString

      public String toString()
      How this Expression is written in Java, such as temp.averageOverSamples(5), temp.minus(5.0) or count(Run).within(60000): a Channel and a Rule by their names, a constant as a double (plus(5) reads plus(5.0)), a duration in milliseconds (also when given as a Duration). Error messages use it to name the Expression. Names are printed as they are, so two different Expressions can print alike (a Channel named x.abs() and x.abs() on Channel x); the Snapshot fingerprint therefore does not use this text.
      Overrides:
      toString in class Object