commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Schnitzer <j...@infohazard.org>
Subject Re: [jexl] Test for existence
Date Fri, 02 Mar 2012 14:13:35 GMT
Thanks, that is exactly what I was looking for!

I highly recommend separating "elvis operator" out as a separate line in
the docs from "ternary conditional".  My eyes blazed past it because my
mind said "I know what a ternary operator is and it's not what I'm looking
for".  I went up and down the page a couple times without seeing it.

Thanks again,
Jeff

On Fri, Mar 2, 2012 at 6:48 AM, henrib <henrib@apache.org> wrote:

> Hi Jeff,
> Using the 'elvis' operator should allow what you seek; in strict mode, it
> allows non existent vars expressions to be handled without errors.
> Something
> like 'foo?:false' might do for you use case.
> Check http://commons.apache.org/jexl/reference/syntax.html on ternary
> conditional.
> Let us know if this fits your purpose,
> Cheers.
> Henrib
>
> --
> View this message in context:
> http://apache-commons.680414.n4.nabble.com/jexl-Test-for-existence-tp4434182p4438198.html
> Sent from the Commons - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message