Interface ISequencePattern<E>
- Type Parameters:
E- is the type of the elements of the sequences aISequencePatternselects.
- All Known Implementing Classes:
SequencePattern
public interface ISequencePattern<E>
A
ISequencePattern is a pattern for sequences.
-The sequences of a ISequencePattern must have a defined length.
-The elements of the sequences of a ISequencePattern must fulfill the
element conditions of the ISequencePattern.
-The sequences of a ISequencePattern must fulfill all sequence
conditions of the ISequencePattern.- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptionforNext(int count) IContainer<? extends IContainer<E>> getMatchingSequencesFrom(IContainer<E> container) withConditionForNext(Predicate<E> condition) withConditionsForNexts(IContainer<Predicate<E>> conditions) withSequenceCondition(Predicate<IContainer<E>> sequenceCondition) Adds the given sequenceCondition to the currentISequencePattern.
-
Method Details
-
withBlankForNext
ISequencePattern<E> withBlankForNext()- Returns:
- a new
ISequencePatternfrom the currentISequencePatternwith a blank condition for the next element of the sequences of theISequencePattern.
-
withConditionForNext
- Parameters:
condition-- Returns:
- a new
ISequencePatternfrom the currentISequencePatternwith the given condition for the next element of the sequences of theISequencePattern. - Throws:
RuntimeException- if the given condition is null.
-
withConditionsForNexts
- Parameters:
conditions-- Returns:
- a new
ISequencePatternfrom the currentISequencePatternwith the given conditions for the next elements of the sequences of theISequencePattern. - Throws:
RuntimeException- if the given condition is null.RuntimeException- if one of the given conditions is null.
-
withSequenceCondition
Adds the given sequenceCondition to the currentISequencePattern.- Parameters:
sequenceCondition-- Returns:
- a new
ISequencePatternfrom the currentISequencePatternwith the given sequenceCondition for the sequences theISequencePattern. - Throws:
RuntimeException- if the given sequenceCondition is null.
-
forNext
- Parameters:
count-- Returns:
- a new
ISequencePatternNextMediatorfor the currentISequencePatternand the given count. - Throws:
RuntimeException- if the given count is negative.
-
getMatchingSequencesFrom
- Parameters:
container-- Returns:
- all sequences from the given container that match the current
ISequencePattern.
-