Class InfixExpression


  • public final class InfixExpression
    extends Object
    Static methods for working with infix expressions. Contains methods for creating ISymbolTables and IInfixExpressionHandler.
    Since:
    7.0.0
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • newHandler

        public static <TConstant extends IConstant,​TOperator extends IOperatorIInfixExpressionHandler<TConstant,​TOperator> newHandler​(ISymbolTable<TConstant,​TOperator> symbols)
        Parameters:
        symbols - A list of symbols supported by the infix expression.
        Returns:
        A new parser for an infix expression with the given symbols.
      • newSymbolTable

        public static <EOperator extends Enum<EOperator> & IOperator,​EConstant extends Enum<EConstant> & IConstantISymbolTableBuilder<EConstant,​EOperator> newSymbolTable​(Class<EOperator> operatorEnum,
                                                                                                                                                                                        Class<EConstant> constantEnum)
        Parameters:
        operatorEnum - Enumeration class with the supported operators.
        constantEnum - Enumeration class with the supported symbols.
        Returns:
        A new symbol table with the given operator and constant symbols.
      • newSymbolTable

        public static <TConstant extends IConstant,​TOperator extends IOperatorISymbolTableBuilder<TConstant,​TOperator> newSymbolTable​(Iterable<TConstant> constants,
                                                                                                                                                    Iterable<TOperator> operators)
        Parameters:
        operators - A list of supported operators.
        constants - A list of supported symbols.
        Returns:
        A new symbol table with the given operator and constant symbols.