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.
      • getAvailablePrefixOperatorNames

        default java.util.Set<java.lang.String> getAvailablePrefixOperatorNames()
        Get all prefix operator names in current configuration.
        Returns:
        A set of all defined prefix operator names.
        Throws:
        java.lang.UnsupportedOperationException - when this operation is not supported by the implementation.
      • getAvailablePostfixOperatorNames

        default java.util.Set<java.lang.String> getAvailablePostfixOperatorNames()
        Get all postfix operator names in current configuration.
        Returns:
        A set of all defined postfix operator names.
        Throws:
        java.lang.UnsupportedOperationException - when this operation is not supported by the implementation.
      • getAvailableInfixOperatorNames

        default java.util.Set<java.lang.String> getAvailableInfixOperatorNames()
        Get all infix operator names in current configuration.
        Returns:
        A set of all defined infix operator names.
        Throws:
        java.lang.UnsupportedOperationException - when this operation is not supported by the implementation.
      • getAvailablePrefixOperators

        default java.util.Set<OperatorIfc> getAvailablePrefixOperators()
        Get all prefix operators in current configuration.
        Returns:
        A set of all defined prefix operators.
        Throws:
        java.lang.UnsupportedOperationException - when this operation is not supported by the implementation.
      • getAvailablePostfixOperators

        default java.util.Set<OperatorIfc> getAvailablePostfixOperators()
        Get all postfix operators in current configuration.
        Returns:
        A set of all defined postfix operators.
        Throws:
        java.lang.UnsupportedOperationException - when this operation is not supported by the implementation.
      • getAvailableInfixOperators

        default java.util.Set<OperatorIfc> getAvailableInfixOperators()
        Get all infix operators in current configuration.
        Returns:
        A set of all defined infix operators.
        Throws:
        java.lang.UnsupportedOperationException - when this operation is not supported by the implementation.