Package: adaptive-expressions
The IsTime class is used to determine whether a given TimexProperty or Timex expression refers to a valid time. In order for a time to be considered valid, it must include hours, minutes, and seconds.
Extends
ExpressionEvaluator
Constructors
IsTime()
Initializes a new instance of the IsTime class.
Properties
negation
Gets or sets the evaluator that represents the negation of this IsTime evaluator.
Inherited Properties
returnType
The type expected by evaluating the expression.
type
The expression type for the evaluator.
Inherited Methods
tryEvaluate(expression, state, options)
Evaluate an expression.
validateExpression(expression)
Validate an expression.
Constructor Details
IsTime()
Initializes a new instance of the IsTime class.
Property Details
negation
Gets or sets the evaluator that represents the negation of this IsTime evaluator.
Type: ExpressionEvaluator
Inherited Property Details
returnType
The type expected by evaluating the expression.
Type: ReturnType
type
The expression type for the evaluator.
Type: string
Inherited Method Details
tryEvaluate(expression, state, options)
Evaluate an expression.
Parameters:
- expression: The expression to evaluate.
- state: Global state information.
- options: Options used in the evaluation.
Returns: The value and error string, which is non-null if there is an error.
validateExpression(expression)
Validate an expression.
Parameters:
- expression: The expression to validate.
The IsTime class is a useful tool for checking whether a TimexProperty or Timex expression represents a valid time. By utilizing this class, you can ensure that the time values provided meet the necessary criteria.