/** * Appends a new pattern to the existing one. The new pattern enforces non-strict * temporal contiguity. This means that a matching event of this pattern and the * preceding matching event might be interleaved with other events which are ignored. * * @param name Name of the new pattern * @return A new pattern which is appended to this one */ public Pattern<T, T> followedByAny(final String name) { return new Pattern<>(name, this, ConsumingStrategy.SKIP_TILL_ANY, afterMatchSkipStrategy); }
/** * Starts a new pattern sequence. The provided name is the one of the initial pattern * of the new sequence. Furthermore, the base type of the event sequence is set. * * @param name The name of starting pattern of the new pattern sequence * @param afterMatchSkipStrategy the {@link AfterMatchSkipStrategy.SkipStrategy} to use after each match. * @param <X> Base type of the event pattern * @return The first pattern of a pattern sequence */ public static <X> Pattern<X, X> begin(final String name, final AfterMatchSkipStrategy afterMatchSkipStrategy) { return new Pattern<X, X>(name, null, ConsumingStrategy.STRICT, afterMatchSkipStrategy); }
/** * Appends a new pattern to the existing one. The new pattern enforces strict * temporal contiguity. This means that the whole pattern sequence matches only * if an event which matches this pattern directly follows the preceding matching * event. Thus, there cannot be any events in between two matching events. * * @param name Name of the new pattern * @return A new pattern which is appended to this one */ public Pattern<T, T> next(final String name) { return new Pattern<>(name, this, ConsumingStrategy.STRICT, afterMatchSkipStrategy); }
/** * Appends a new pattern to the existing one. The new pattern enforces non-strict * temporal contiguity. This means that a matching event of this pattern and the * preceding matching event might be interleaved with other events which are ignored. * * @param name Name of the new pattern * @return A new pattern which is appended to this one */ public Pattern<T, T> followedBy(final String name) { return new Pattern<>(name, this, ConsumingStrategy.SKIP_TILL_NEXT, afterMatchSkipStrategy); }
/** * Starts a new pattern sequence. The provided name is the one of the initial pattern * of the new sequence. Furthermore, the base type of the event sequence is set. * * @param name The name of starting pattern of the new pattern sequence * @param <X> Base type of the event pattern * @return The first pattern of a pattern sequence */ public static <X> Pattern<X, X> begin(final String name) { return new Pattern<>(name, null, ConsumingStrategy.STRICT, AfterMatchSkipStrategy.noSkip()); }
/** * Appends a new pattern to the existing one. The new pattern enforces that there is no event matching this pattern * right after the preceding matched event. * * @param name Name of the new pattern * @return A new pattern which is appended to this one */ public Pattern<T, T> notNext(final String name) { if (quantifier.hasProperty(Quantifier.QuantifierProperty.OPTIONAL)) { throw new UnsupportedOperationException( "Specifying a pattern with an optional path to NOT condition is not supported yet. " + "You can simulate such pattern with two independent patterns, one with and the other without " + "the optional part."); } return new Pattern<>(name, this, ConsumingStrategy.NOT_NEXT, afterMatchSkipStrategy); }
/** * Appends a new pattern to the existing one. The new pattern enforces that there is no event matching this pattern * between the preceding pattern and succeeding this one. * * <p><b>NOTE:</b> There has to be other pattern after this one. * * @param name Name of the new pattern * @return A new pattern which is appended to this one */ public Pattern<T, T> notFollowedBy(final String name) { if (quantifier.hasProperty(Quantifier.QuantifierProperty.OPTIONAL)) { throw new UnsupportedOperationException( "Specifying a pattern with an optional path to NOT condition is not supported yet. " + "You can simulate such pattern with two independent patterns, one with and the other without " + "the optional part."); } return new Pattern<>(name, this, ConsumingStrategy.NOT_FOLLOW, afterMatchSkipStrategy); }
/** * Starts a new pattern sequence. The provided name is the one of the initial pattern * of the new sequence. Furthermore, the base type of the event sequence is set. * * @param name The name of starting pattern of the new pattern sequence * @param afterMatchSkipStrategy the {@link AfterMatchSkipStrategy.SkipStrategy} to use after each match. * @param <X> Base type of the event pattern * @return The first pattern of a pattern sequence */ public static <X> Pattern<X, X> begin(final String name, final AfterMatchSkipStrategy afterMatchSkipStrategy) { return new Pattern<X, X>(name, null, ConsumingStrategy.STRICT, afterMatchSkipStrategy); }
/** * Starts a new pattern sequence. The provided name is the one of the initial pattern * of the new sequence. Furthermore, the base type of the event sequence is set. * * @param name The name of starting pattern of the new pattern sequence * @param <X> Base type of the event pattern * @return The first pattern of a pattern sequence */ public static <X> Pattern<X, X> begin(final String name) { return new Pattern<X, X>(name, null); }
/** * Appends a new pattern to the existing one. The new pattern enforces non-strict * temporal contiguity. This means that a matching event of this pattern and the * preceding matching event might be interleaved with other events which are ignored. * * @param name Name of the new pattern * @return A new pattern which is appended to this one */ public Pattern<T, T> followedByAny(final String name) { return new Pattern<>(name, this, ConsumingStrategy.SKIP_TILL_ANY); }
/** * Appends a new pattern to the existing one. The new pattern enforces non-strict * temporal contiguity. This means that a matching event of this pattern and the * preceding matching event might be interleaved with other events which are ignored. * * @param name Name of the new pattern * @return A new pattern which is appended to this one */ public Pattern<T, T> followedBy(final String name) { return new Pattern<>(name, this, ConsumingStrategy.SKIP_TILL_NEXT, afterMatchSkipStrategy); }
/** * Appends a new pattern to the existing one. The new pattern enforces non-strict * temporal contiguity. This means that a matching event of this pattern and the * preceding matching event might be interleaved with other events which are ignored. * * @param name Name of the new pattern * @return A new pattern which is appended to this one */ public Pattern<T, T> followedByAny(final String name) { return new Pattern<>(name, this, ConsumingStrategy.SKIP_TILL_ANY, afterMatchSkipStrategy); }
/** * Appends a new pattern to the existing one. The new pattern enforces strict * temporal contiguity. This means that the whole pattern sequence matches only * if an event which matches this pattern directly follows the preceding matching * event. Thus, there cannot be any events in between two matching events. * * @param name Name of the new pattern * @return A new pattern which is appended to this one */ public Pattern<T, T> next(final String name) { return new Pattern<>(name, this, ConsumingStrategy.STRICT); }
/** * Appends a new pattern to the existing one. The new pattern enforces strict * temporal contiguity. This means that the whole pattern sequence matches only * if an event which matches this pattern directly follows the preceding matching * event. Thus, there cannot be any events in between two matching events. * * @param name Name of the new pattern * @return A new pattern which is appended to this one */ public Pattern<T, T> next(final String name) { return new Pattern<>(name, this, ConsumingStrategy.STRICT, afterMatchSkipStrategy); }
/** * Appends a new pattern to the existing one. The new pattern enforces strict * temporal contiguity. This means that the whole pattern sequence matches only * if an event which matches this pattern directly follows the preceding matching * event. Thus, there cannot be any events in between two matching events. * * @param name Name of the new pattern * @return A new pattern which is appended to this one */ public Pattern<T, T> next(final String name) { return new Pattern<>(name, this, ConsumingStrategy.STRICT, afterMatchSkipStrategy); }
/** * Appends a new pattern to the existing one. The new pattern enforces non-strict * temporal contiguity. This means that a matching event of this pattern and the * preceding matching event might be interleaved with other events which are ignored. * * @param name Name of the new pattern * @return A new pattern which is appended to this one */ public Pattern<T, T> followedBy(final String name) { return new Pattern<>(name, this, ConsumingStrategy.SKIP_TILL_NEXT, afterMatchSkipStrategy); }
/** * Appends a new pattern to the existing one. The new pattern enforces non-strict * temporal contiguity. This means that a matching event of this pattern and the * preceding matching event might be interleaved with other events which are ignored. * * @param name Name of the new pattern * @return A new pattern which is appended to this one */ public Pattern<T, T> followedByAny(final String name) { return new Pattern<>(name, this, ConsumingStrategy.SKIP_TILL_ANY, afterMatchSkipStrategy); }
/** * Appends a new pattern to the existing one. The new pattern enforces non-strict * temporal contiguity. This means that a matching event of this pattern and the * preceding matching event might be interleaved with other events which are ignored. * * @param name Name of the new pattern * @return A new pattern which is appended to this one */ public Pattern<T, T> followedBy(final String name) { return new Pattern<>(name, this, ConsumingStrategy.SKIP_TILL_NEXT); }
/** * Starts a new pattern sequence. The provided name is the one of the initial pattern * of the new sequence. Furthermore, the base type of the event sequence is set. * * @param name The name of starting pattern of the new pattern sequence * @param <X> Base type of the event pattern * @return The first pattern of a pattern sequence */ public static <X> Pattern<X, X> begin(final String name) { return new Pattern<>(name, null, ConsumingStrategy.STRICT, AfterMatchSkipStrategy.noSkip()); }
/** * Starts a new pattern sequence. The provided name is the one of the initial pattern * of the new sequence. Furthermore, the base type of the event sequence is set. * * @param name The name of starting pattern of the new pattern sequence * @param <X> Base type of the event pattern * @return The first pattern of a pattern sequence */ public static <X> Pattern<X, X> begin(final String name) { return new Pattern<>(name, null, ConsumingStrategy.STRICT, AfterMatchSkipStrategy.noSkip()); }