Class AbstractExpression<E>

java.lang.Object
org.jppf.node.policy.AbstractExpression<E>
Type Parameters:
E - the type of results returned by the expression.
All Implemented Interfaces:
Serializable, Expression<E>
Direct Known Subclasses:
BooleanExpression, NumericExpression, StringExpression

public abstract class AbstractExpression<E> extends Object implements Expression<E>
Common super class for expressions written as the value of configuration properties containing; properties substitutions and scripted values, i.e. containing expressions of the form "${<property_name>}" or "$script:<language>:<script_source>{<inline_script_or_script_location>}$".

Author:
Laurent Cohen
See Also:
  • Constructor Details

    • AbstractExpression

      public AbstractExpression(String expression)
      Initialize with a string expression.
      Parameters:
      expression - the expression to evaluate.
  • Method Details

    • evaluate

      public E evaluate(PropertiesCollection<String> properties)
      Description copied from interface: Expression
      Evaluate this expression against a set of properties.
      Specified by:
      evaluate in interface Expression<E>
      Parameters:
      properties - against which to evaluate.
      Returns:
      the expression result.
    • getExpression

      public String getExpression()
      Specified by:
      getExpression in interface Expression<E>
      Returns:
      the string representing the expression.
    • isLiteral

      public boolean isLiteral()
      Specified by:
      isLiteral in interface Expression<E>
      Returns:
      whether this expression is a literal value.