Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring expression: please provide additional convenience operators for comparisons [SPR-5518] #10189

Closed
spring-projects-issues opened this issue Feb 23, 2009 · 3 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Oliver Becker opened SPR-5518 and commented

The SPEL grammar requires <, >, <=, >=, etc for comparisons. Since these operators must be escaped as entity references when used within XML, it would be good to have the following extra operator notations for convenience:
lt for <
gt for >
le for <=
ge for >=

as well as
eq for ==
ne for !=


Affects: 3.0 M1

3 votes, 3 watchers

@spring-projects-issues
Copy link
Collaborator Author

Allen Parslow commented

Also the following would be good:

div for /
mod for %
not for !

empty for [not sure if there is an antlr type for this one]

@spring-projects-issues
Copy link
Collaborator Author

Andy Clement commented

Support committed for these textual alternative representation for operators:

lt for <
gt for >
le for <=
ge for >=
eq for ==
ne for !=
div for /
mod for %
not for !

they are also case insensitive.

I don't know what you want for 'empty' - if you give me an example then I'll see what I can do.

I have yet to do the required doc updates for this.

@spring-projects-issues
Copy link
Collaborator Author

Andy Clement commented

Doc updates are complete for the textual equivalents for each operator. No feedback received on 'empty' so haven't done anything about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants