Package io.jawk.jrt
Class ConditionPair
java.lang.Object
io.jawk.jrt.ConditionPair
Tracks whether we are within a range defined by a pair of condition:
- startCondition
- endCondition
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidenter()Marks the range as started, after the start condition matched the current record.booleanisWithin()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.voidleave()Marks the range as finished, after the end condition matched the current record.booleanupdate(boolean startMatches, boolean endMatches) Update the status of the condition pair according to whether the begin and end conditions match or not
-
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 rangeendMatches- 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.
-