public class

OperatorBetween

extends Operator
java.lang.Object
   ↳ org.springframework.expression.spel.ast.SpelNodeImpl
     ↳ org.springframework.expression.spel.ast.Operator
       ↳ org.springframework.expression.spel.ast.OperatorBetween

Class Overview

Represents the between operator. The left operand to between must be a single value and the right operand must be a list - this operator returns true if the left operand is between (using the registered comparator) the two elements in the list. The definition of between being inclusive follows the SQL BETWEEN definition.

Summary

[Expand]
Inherited Fields
From class org.springframework.expression.spel.ast.SpelNodeImpl
Public Constructors
OperatorBetween(int pos, SpelNodeImpl... operands)
Public Methods
BooleanTypedValue getValueInternal(ExpressionState state)
Returns a boolean based on whether a value is in the range expressed.
[Expand]
Inherited Methods
From class org.springframework.expression.spel.ast.Operator
From class org.springframework.expression.spel.ast.SpelNodeImpl
From class java.lang.Object
From interface org.springframework.expression.spel.SpelNode

Public Constructors

public OperatorBetween (int pos, SpelNodeImpl... operands)

Public Methods

public BooleanTypedValue getValueInternal (ExpressionState state)

Returns a boolean based on whether a value is in the range expressed. The first operand is any value whilst the second is a list of two values - those two values being the bounds allowed for the first operand (inclusive).

Parameters
state the expression state
Returns
  • true if the left operand is in the range specified, false otherwise
Throws
EvaluationException if there is a problem evaluating the expression