Class BetweenII

All Implemented Interfaces:
Serializable

public class BetweenII extends ExecutionPolicy
An execution policy rule that encapsulates a test of type a <= property_value_or_expression <= b. The test applies to numeric values only.
Author:
Laurent Cohen
See Also:
  • Field Details

  • Constructor Details

    • BetweenII

      public BetweenII(String propertyNameOrExpression, double a, double b)
      Define a comparison of type value between a and b with a included and b included.
      Parameters:
      propertyNameOrExpression - either a literal string which represents a property name, or an expression resolving to a numeric value.
      a - the lower bound.
      b - the upper bound.
    • BetweenII

      public BetweenII(String propertyNameOrExpression, String a, double b)
      Define a comparison of type value between a and b with a included and b included.
      Parameters:
      propertyNameOrExpression - either a literal string which represents a property name, or an expression resolving to a numeric value.
      a - the lower bound expression.
      b - the upper bound.
    • BetweenII

      public BetweenII(String propertyNameOrExpression, double a, String b)
      Define a comparison of type value between a and b with a included and b included.
      Parameters:
      propertyNameOrExpression - either a literal string which represents a property name, or an expression resolving to a numeric value.
      a - the lower bound expression.
      b - the upper bound.
    • BetweenII

      public BetweenII(String propertyNameOrExpression, String a, String b)
      Define a comparison of type value between a and b with a included and b included.
      Parameters:
      propertyNameOrExpression - either a literal string which represents a property name, or an expression resolving to a numeric value.
      a - the lower bound expression.
      b - the upper bound expression.
  • Method Details

    • accepts

      public boolean accepts(PropertiesCollection<String> info)
      Determines whether this policy accepts the specified node.
      Specified by:
      accepts in class ExecutionPolicy
      Parameters:
      info - system information for the node on which the tasks will run if accepted.
      Returns:
      true if the node is accepted, false otherwise.
    • toString

      public String toString(int n)
      Description copied from class: ExecutionPolicy
      Get an xml string representation of this policy with the specified starting indentation level.
      Specified by:
      toString in class ExecutionPolicy
      Parameters:
      n - the size of the indent to startwith.
      Returns:
      an indented string depending on the value of toStringIndent.
    • getLeftOperandValue

      protected Object getLeftOperandValue(PropertiesCollection<String> properties)
      Parameters:
      properties - the proeprties collection to evaluate against.
      Returns:
      the typed value of the left operand expression.