Class FlexibleStringExpander.ConstSimpleElem
- java.lang.Object
-
- org.apache.ofbiz.base.util.string.FlexibleStringExpander
-
- org.apache.ofbiz.base.util.string.FlexibleStringExpander.ConstSimpleElem
-
- All Implemented Interfaces:
java.io.Serializable
,IsEmpty
- Enclosing class:
- FlexibleStringExpander
protected static class FlexibleStringExpander.ConstSimpleElem extends FlexibleStringExpander
An object that represents aString
constant portion of an expression.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.ofbiz.base.util.string.FlexibleStringExpander
FlexibleStringExpander.ArrayOffsetString, FlexibleStringExpander.ConstOffsetElem, FlexibleStringExpander.ConstSimpleElem, FlexibleStringExpander.CurrElem, FlexibleStringExpander.Elements, FlexibleStringExpander.NestedVarElem, FlexibleStringExpander.ScriptElem, FlexibleStringExpander.VarElem
-
-
Field Summary
-
Fields inherited from class org.apache.ofbiz.base.util.string.FlexibleStringExpander
chars, closeBracket, exprCache, hint, module, nullExpr, openBracket
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ConstSimpleElem(char[] chars)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
expandString(java.util.Map<java.lang.String,? extends java.lang.Object> context, java.util.TimeZone timeZone, java.util.Locale locale)
Evaluate this object's expression and return the result as aString
.protected java.lang.Object
get(java.util.Map<java.lang.String,? extends java.lang.Object> context, java.util.TimeZone timeZone, java.util.Locale locale)
java.lang.String
getOriginal()
Returns a copy of the original expression.boolean
isEmpty()
Returnstrue
if the original expression is empty ornull
.-
Methods inherited from class org.apache.ofbiz.base.util.string.FlexibleStringExpander
containsConstant, containsExpression, containsScript, expand, expand, expand, expandString, expandString, expandString, expandString, expandString, getInstance, getInstance, getStrElems, toString
-
-
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
Description copied from class:FlexibleStringExpander
Returnstrue
if the original expression is empty ornull
.- Specified by:
isEmpty
in interfaceIsEmpty
- Specified by:
isEmpty
in classFlexibleStringExpander
- Returns:
true
if the original expression is empty ornull
-
getOriginal
public java.lang.String getOriginal()
Description copied from class:FlexibleStringExpander
Returns a copy of the original expression.- Specified by:
getOriginal
in classFlexibleStringExpander
- Returns:
- The original expression
-
expandString
public java.lang.String expandString(java.util.Map<java.lang.String,? extends java.lang.Object> context, java.util.TimeZone timeZone, java.util.Locale locale)
Description copied from class:FlexibleStringExpander
Evaluate this object's expression and return the result as aString
. Null or empty expressions return an emptyString
. Anull context
argument will return the original expression.- Overrides:
expandString
in classFlexibleStringExpander
- Parameters:
context
- The evaluation contexttimeZone
- The time zone to be used for localizationlocale
- The locale to be used for localization- Returns:
- This object's expression result as a
String
-
get
protected java.lang.Object get(java.util.Map<java.lang.String,? extends java.lang.Object> context, java.util.TimeZone timeZone, java.util.Locale locale)
- Specified by:
get
in classFlexibleStringExpander
-
-