Interface OperatorDictionaryIfc

    • Method Detail

      • addOperator

        void addOperator​(java.lang.String operatorString,
                         OperatorIfc operator)
        Allows to add an operator to the dictionary. Implementation is optional, if you have a fixed set of operators, this method can throw an exception.
        Parameters:
        operatorString - The operator name.
        operator - The operator implementation.
      • hasPrefixOperator

        default boolean hasPrefixOperator​(java.lang.String operatorString)
        Check if the dictionary has a prefix operator with that name.
        Parameters:
        operatorString - The operator name to look for.
        Returns:
        true if an operator was found or false if not.
      • hasPostfixOperator

        default boolean hasPostfixOperator​(java.lang.String operatorString)
        Check if the dictionary has a postfix operator with that name.
        Parameters:
        operatorString - The operator name to look for.
        Returns:
        true if an operator was found or false if not.
      • hasInfixOperator

        default boolean hasInfixOperator​(java.lang.String operatorString)
        Check if the dictionary has an infix operator with that name.
        Parameters:
        operatorString - The operator name to look for.
        Returns:
        true if an operator was found or false if not.
      • getPrefixOperator

        OperatorIfc getPrefixOperator​(java.lang.String operatorString)
        Get the operator definition for a prefix operator name.
        Parameters:
        operatorString - The name of the operator.
        Returns:
        The operator definition or null if no operator was found.
      • getPostfixOperator

        OperatorIfc getPostfixOperator​(java.lang.String operatorString)
        Get the operator definition for a postfix operator name.
        Parameters:
        operatorString - The name of the operator.
        Returns:
        The operator definition or null if no operator was found.
      • getInfixOperator

        OperatorIfc getInfixOperator​(java.lang.String operatorString)
        Get the operator definition for an infix operator name.
        Parameters:
        operatorString - The name of the operator.
        Returns:
        The operator definition or null if no operator was found.