Package io.jawk.jrt

Class ConditionPair

java.lang.Object
io.jawk.jrt.ConditionPair

public class ConditionPair extends Object
Tracks whether we are within a range defined by a pair of condition:
  • startCondition
  • endCondition
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor for ConditionPair.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Marks the range as started, after the start condition matched the current record.
    boolean
    Returns whether we're currently within the range, i.e. the start condition matched a previous record and the end condition hasn't matched yet.
    void
    Marks the range as finished, after the end condition matched the current record.
    boolean
    update(boolean startMatches, boolean endMatches)
    Update the status of the condition pair according to whether the begin and end conditions match or not

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ConditionPair

      public ConditionPair()

      Constructor for ConditionPair.

  • Method Details

    • update

      public boolean update(boolean startMatches, boolean endMatches)
      Update the status of the condition pair according to whether the begin and end conditions match or not
      Parameters:
      startMatches - True if the start condition is true, which means we're entering the range
      endMatches - True if the end condition is true, which means we're leaving the range
      Returns:
      wether we're within the range
    • isWithin

      public boolean isWithin()
      Returns whether we're currently within the range, i.e. the start condition matched a previous record and the end condition hasn't matched yet.
      Returns:
      whether we're within the range
    • enter

      public void enter()
      Marks the range as started, after the start condition matched the current record.
    • leave

      public void leave()
      Marks the range as finished, after the end condition matched the current record.