Package org.apache.juneau.svl.vars
Class IfVar
java.lang.Object
org.apache.juneau.svl.Var
org.apache.juneau.svl.SimpleVar
org.apache.juneau.svl.MultipartVar
org.apache.juneau.svl.vars.IfVar
A basic if-else logic variable resolver.
 
The format for this var is one of the following:
- "$IF{booleanArg,thenValue}" 
- "$IF{booleanArg,thenValue,elseValue}" 
 The boolean argument is any string.
 
The following values are interpreted as 
All else are interpreted as 
Example:
   
 Since this is a MultipartVar, any variables contained in the result will be recursively resolved.
 
Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var.
 
See Also:
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionresolve(VarResolverSession session, String[] args) The interface that needs to be implemented for this interface.Methods inherited from class org.apache.juneau.svl.MultipartVarresolveMethods inherited from class org.apache.juneau.svl.VarallowNested, allowRecurse, canResolve, doResolve, getName
- 
Field Details- 
NAMEThe name of this variable.- See Also:
 
 
- 
- 
Constructor Details- 
IfVarpublic IfVar()Constructor.
 
- 
- 
Method Details- 
resolveDescription copied from class:MultipartVarThe interface that needs to be implemented for this interface.- Specified by:
- resolvein class- MultipartVar
- Parameters:
- session- The session object used for a single instance of a string resolution.
- args- The arguments inside the variable.
- Returns:
- The resolved variable.
 
 
-