Class LogicalExpression

  • All Implemented Interfaces:
    Expression
    Direct Known Subclasses:
    AndExpression, OrExpression

    public abstract class LogicalExpression
    extends CompoundExpression
    This expression represents a logical expression, which means the first and second expressions are aggregated with either AND or OR.
    Version:
    2.5
    Author:
    Pascal Filion
    Since:
    2.3
    • Constructor Detail

      • LogicalExpression

        protected LogicalExpression​(AbstractExpression parent,
                                    String identifier)
        Creates a new LogicalExpression.
        Parameters:
        parent - The parent of this expression
        identifier - The identifier of this expression
    • Method Detail

      • isParsingComplete

        protected boolean isParsingComplete​(WordParser wordParser,
                                            String word,
                                            Expression expression)
        Description copied from class: AbstractExpression
        Determines whether the parsing is complete based on what is left in the given text. The text is never empty.
        Overrides:
        isParsingComplete in class AbstractExpression
        Parameters:
        wordParser - The text to parse based on the current position of the cursor
        word - The word that was retrieved from the given text, which is the first word in the text
        expression - The Expression that has already been parsed
        Returns:
        true if the text no longer can't be parsed by the current expression; false if more can be parsed