Class GroupingExpression

    • Constructor Detail

      • GroupingExpression

        protected GroupingExpression​(java.lang.String image,
                                     java.lang.String label,
                                     java.lang.Integer level)
    • Method Detail

      • resolveLevel

        public void resolveLevel​(int level)
        Resolves the conceptual level of this expression. This level represents the type of data that is consumed by this expression, where level 0 is a single hit, level 1 is a group, level 2 is a list of groups, and so forth. This method verifies the input level against the expression type, and recursively resolves the level of all argument expressions.
        level - The level of the input data.
        java.lang.IllegalArgumentException - Thrown if the level of this expression could not be resolved.
        java.lang.IllegalStateException - Thrown if type failed to accept the number of arguments provided.
      • getLevel

        public int getLevel()
        Returns the conceptual level of this expression.
        the level.
        java.lang.IllegalArgumentException - thrown if the level of this expression has not been resolved.
        See Also:
      • getLevelOrNull

        protected final java.lang.Integer getLevelOrNull()
      • asString

        public static java.lang.String asString​(java.util.List<GroupingExpression> lst)
        Returns a string description of the given list of expressions. This is a comma-separated list of the expressions own GroupingNode.toString() output.
        lst - The list of expressions to output.
        The string description.
      • asImage

        public static java.lang.String asImage​(java.lang.Object obj)
        Returns a string representation of an object that can be used in the 'image' constructor argument of GroupingNode. This method ensures that strings are quoted, and that all complex characters are escaped.
        obj - The object to output.
        The string representation.
      • setLabel

        public GroupingExpression setLabel​(java.lang.String label)
        Description copied from class: GroupingNode
        Assigns a label to this grouping expression. The label is applied to the results of this expression so that they can be identified by the caller when processing the output.
        setLabel in class GroupingNode
        label - The label to assign to this.
        This, to allow chaining.