Class Condition.Count

  • All Implemented Interfaces:
    Condition
    Enclosing interface:
    Condition

    public static final class Condition.Count
    extends Object
    implements Condition
    count(<stream> [where (body)]) OP n - cardinality of a (optionally filtered) stream.
    • Constructor Detail

      • Count

        public Count​(Accessor stream,
                     Condition body,
                     Operator op,
                     Operand operand)
        Creates a cardinality test over a sub-subject stream.
        Parameters:
        stream - the accessor producing the sub-subjects
        body - the filter applied before counting, or null to count everything
        op - the operator the count is tested with
        operand - the value the count is tested against
    • Method Detail

      • stream

        public Accessor stream()
        Returns:
        the counted stream accessor
      • body

        public Condition body()
        Returns:
        the filter condition, or null to count all
      • op

        public Operator op()
        Returns:
        the operator applied to the count
      • operand

        public Operand operand()
        Returns:
        the operand the count is compared against
      • 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