Class Condition.Quantifier

  • All Implemented Interfaces:
    Condition
    Enclosing interface:
    Condition

    public static final class Condition.Quantifier
    extends Object
    implements Condition
    has|any|all|none <stream> where (body).
    • Constructor Detail

      • Quantifier

        public Quantifier​(Condition.Quant quant,
                          Accessor stream,
                          Condition body)
        Creates a quantification over a sub-subject stream.
        Parameters:
        quant - whether any, all, or none of the stream must satisfy the body
        stream - the accessor producing the sub-subjects
        body - the per-element condition, or null to test existence alone
    • Method Detail

      • stream

        public Accessor stream()
        Returns:
        the sub-subject stream accessor
      • body

        public Condition body()
        Returns:
        the where-body condition, or null for plain existence
      • accept

        public <R> R accept​(Condition.Visitor<R> v)
        Description copied from interface: Condition
        Dispatches to the visitor method for this node's variant.
        Specified by:
        accept in interface Condition
        Type Parameters:
        R - the visitor's result type
        Parameters:
        v - the visitor to dispatch to
        Returns:
        whatever the visitor returns