Package me.hsgamer.hscore.expression
Class ExpressionUtils
java.lang.Object
me.hsgamer.hscore.expression.ExpressionUtils
The expression manager
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.ezylang.evalex.config.ExpressionConfigurationapplyExpressionConfigurationModifier(com.ezylang.evalex.config.ExpressionConfiguration configuration) Apply the modifier to the expression configurationstatic com.ezylang.evalex.config.ExpressionConfigurationGet the default expression configurationstatic Function<com.ezylang.evalex.config.ExpressionConfiguration,com.ezylang.evalex.config.ExpressionConfiguration> Get the expression configuration modifierstatic voidregisterFunction(String name, com.ezylang.evalex.functions.FunctionIfc function) Register a functionstatic voidregisterOperator(String name, com.ezylang.evalex.operators.OperatorIfc operator) Register an operator
-
Method Details
-
registerFunction
Register a function- Parameters:
name- the name of the functionfunction- the function
-
registerOperator
Register an operator- Parameters:
name- the name of the operatoroperator- the operator
-
getExpressionConfigurationModifier
public static Function<com.ezylang.evalex.config.ExpressionConfiguration,com.ezylang.evalex.config.ExpressionConfiguration> getExpressionConfigurationModifier()Get the expression configuration modifier- Returns:
- the expression configuration modifier
-
getDefaultExpressionConfiguration
public static com.ezylang.evalex.config.ExpressionConfiguration getDefaultExpressionConfiguration()Get the default expression configuration- Returns:
- the expression configuration
-
applyExpressionConfigurationModifier
public static com.ezylang.evalex.config.ExpressionConfiguration applyExpressionConfigurationModifier(com.ezylang.evalex.config.ExpressionConfiguration configuration) Apply the modifier to the expression configuration- Parameters:
configuration- the configuration- Returns:
- the modified configuration
-