Class Expression.MinMax<E>

  • Type Parameters:
    E -
    All Implemented Interfaces:
    com.google.common.base.Predicate<E>, Expression<E>, java.util.function.Predicate<E>
    Enclosing interface:
    Expression<E>

    public static class Expression.MinMax<E>
    extends java.lang.Object
    implements Expression<E>
    A minimum to maximum number of occurrences of the enclosed expression. <foo>{1,3}
    • Field Detail

      • minOccurrences

        final int minOccurrences
      • maxOccurrences

        final int maxOccurrences
    • Constructor Detail

      • MinMax

        public MinMax​(Expression<E> expr,
                      int minOccurrences,
                      int maxOccurrences)
        Parameters:
        minOccurrences - minimum occurrences, must be >= 0
        maxOccurrences - maximum occurrences, must be >= 1 - you should prefer small values, as the use of large values will create a large automaton that takes a lot of memory
    • Method Detail

      • apply

        public boolean apply​(E entity)
        Specified by:
        apply in interface com.google.common.base.Predicate<E>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object