public class

OperatorMatches

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

Class Overview

Implements the matches operator. Matches takes two operands. The first is a string and the second is a java regex. It will return true when getValue() is called if the first operand matches the regex.

Summary

[Expand]
Inherited Fields
From class org.springframework.expression.spel.ast.SpelNodeImpl
Public Constructors
OperatorMatches(int pos, SpelNodeImpl... operands)
Public Methods
BooleanTypedValue getValueInternal(ExpressionState state)
Check the first operand matches the regex specified as the second operand.
[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 OperatorMatches (int pos, SpelNodeImpl... operands)

Public Methods

public BooleanTypedValue getValueInternal (ExpressionState state)

Check the first operand matches the regex specified as the second operand.

Parameters
state the expression state
Returns
  • true if the first operand matches the regex specified as the second operand, otherwise false
Throws
EvaluationException if there is a problem evaluating the expression (e.g. the regex is invalid)