Package com.zfabrik.util.expression
Class X
java.lang.Object
com.zfabrik.util.expression.X
- Direct Known Subclasses:
- X.BinaryOp,- X.UnaryOp,- X.Val,- X.Var
Simple boolean expression language as a Java expressed DSL. 
X is used in
 component repositories to formulate component queries but may be used anywhere where 
 simple boolean expressions are useful.
 A built-in evaluation of an expression over a map defining a context is supported.
 For example, given a map m={"a":5, "b":"hello"}, 
 
 var("a").ge(val(6)).and(var("b").eq(val("hello"))).eval(m) 
 
 would evaluate to false while 
 
 var("a").le(val(6)).and(var("b").eq(val("hello"))).eval(m) 
 
 would evaluate to true.- Author:
- hb
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic class"AND" logical operatorstatic classAbstract binary operatorsstatic class"equality" comparison operator.static class"greater or equal" comparison operator.static class"greater than" comparison operator.static class"containment" operator.static class"less or equal" comparison operator.static class"less than" comparison operator.static class"not equals" comparison operator.static classNegation logical operatorstatic class"OR" logical operatorstatic classAbstract single-operand operatorstatic classExplicit value.static classVariable of field value operator.static class"XOR" logical operator
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionConvenience method for chain-style notation of expressions.static XStatic factory method, for convenienceConvenience method for chain-style notation of expressions.static XStatic factory method, for convenienceeval()abstract ObjectEvaluation of the expression over a map style context that defines variable values.eval(Properties context) Convenience version ofeval(Map)accepting aPropertiesargumentConvenience method for chain-style notation of expressions.Convenience method for chain-style notation of expressions.Convenience method for chain-style notation of expressions.Convenience method for chain-style notation of expressions.Convenience method for chain-style notation of expressions.Convenience method for chain-style notation of expressions.static XStatic factory method, for conveniencenot()Convenience method for chain-style notation of expressions.static XStatic factory method, for convenienceConvenience method for chain-style notation of expressions.static XStatic factory method, for conveniencestatic XStatic factory method, for conveniencestatic XStatic factory method, for convenienceConvenience method for chain-style notation of expressions.static XStatic factory method, for convenience
- 
Constructor Details- 
Xpublic X()
 
- 
- 
Method Details- 
orConvenience method for chain-style notation of expressions.
- 
andConvenience method for chain-style notation of expressions.
- 
xorConvenience method for chain-style notation of expressions.
- 
eqConvenience method for chain-style notation of expressions.
- 
ltConvenience method for chain-style notation of expressions.
- 
leConvenience method for chain-style notation of expressions.
- 
gtConvenience method for chain-style notation of expressions.
- 
geConvenience method for chain-style notation of expressions.
- 
inConvenience method for chain-style notation of expressions.
- 
neqConvenience method for chain-style notation of expressions.
- 
notConvenience method for chain-style notation of expressions.
- 
orStatic factory method, for convenience
- 
andStatic factory method, for convenience
- 
xorStatic factory method, for convenience
- 
eqStatic factory method, for convenience
- 
neqStatic factory method, for convenience
- 
notStatic factory method, for convenience
- 
valStatic factory method, for convenience
- 
varStatic factory method, for convenience
- 
evalEvaluation of the expression over a map style context that defines variable values.
- 
evalConvenience version ofeval(Map)accepting aPropertiesargument
- 
eval
 
-