Class GroupPattern<T,​F extends T>

  • Type Parameters:
    T - Base type of the elements appearing in the pattern
    F - Subtype of T to which the current pattern operator is constrained

    public class GroupPattern<T,​F extends T>
    extends Pattern<T,​F>
    Base class for a group pattern definition.
    • Method Detail

      • where

        public Pattern<T,​F> where​(IterativeCondition<F> condition)
        Description copied from class: Pattern
        Adds a condition that has to be satisfied by an event in order to be considered a match. If another condition has already been set, the new one is going to be combined with the previous with a logical AND. In other case, this is going to be the only condition.
        Overrides:
        where in class Pattern<T,​F extends T>
        Parameters:
        condition - The condition as an IterativeCondition.
        Returns:
        The pattern with the new condition is set.
      • or

        public Pattern<T,​F> or​(IterativeCondition<F> condition)
        Description copied from class: Pattern
        Adds a condition that has to be satisfied by an event in order to be considered a match. If another condition has already been set, the new one is going to be combined with the previous with a logical OR. In other case, this is going to be the only condition.
        Overrides:
        or in class Pattern<T,​F extends T>
        Parameters:
        condition - The condition as an IterativeCondition.
        Returns:
        The pattern with the new condition is set.
      • subtype

        public <S extends FPattern<T,​S> subtype​(Class<S> subtypeClass)
        Description copied from class: Pattern
        Applies a subtype constraint on the current pattern. This means that an event has to be of the given subtype in order to be matched.
        Overrides:
        subtype in class Pattern<T,​F extends T>
        Type Parameters:
        S - Type of the subtype
        Parameters:
        subtypeClass - Class of the subtype
        Returns:
        The same pattern with the new subtype constraint
      • getRawPattern

        public Pattern<T,​? extends T> getRawPattern()