|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ofbiz.minilang.method.ContextAccessor<T>
public class ContextAccessor<T>
Used to flexibly access Map values, supporting the "." (dot) syntax for accessing sub-map values and the "[]" (square bracket) syntax for accessing list elements. See individual Map operations for more information.
| Field Summary | |
|---|---|
protected FlexibleMapAccessor<T> |
fma
|
protected java.lang.String |
name
|
| Constructor Summary | |
|---|---|
ContextAccessor(java.lang.String name)
|
|
ContextAccessor(java.lang.String name,
java.lang.String defaultName)
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
The equals and hashCode methods are imnplemented just case this object is ever accidently used as a Map key |
T |
get(java.util.Map<java.lang.String,? extends java.lang.Object> theMap,
MethodContext methodContext)
Based on name get from Map or from List in Map |
T |
get(MethodContext methodContext)
Based on name get from Map or from List in Map |
int |
hashCode()
The equals and hashCode methods are imnplemented just case this object is ever accidently used as a Map key |
protected void |
init(java.lang.String name)
|
boolean |
isEmpty()
|
void |
put(java.util.Map<java.lang.String,java.lang.Object> theMap,
T value,
MethodContext methodContext)
Based on name put in Map or from List in Map; If the brackets for a list are empty the value will be appended to the list, otherwise the value will be set in the position of the number in the brackets. |
void |
put(MethodContext methodContext,
T value)
Based on name put in Map or from List in Map; If the brackets for a list are empty the value will be appended to the list, otherwise the value will be set in the position of the number in the brackets. |
T |
remove(java.util.Map<java.lang.String,? extends java.lang.Object> theMap,
MethodContext methodContext)
Based on name remove from Map or from List in Map |
T |
remove(MethodContext methodContext)
Based on name remove from Map or from List in Map |
java.lang.String |
toString()
To be used for a string representation of the accessor, returns the original name. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String name
protected FlexibleMapAccessor<T> fma
| Constructor Detail |
|---|
public ContextAccessor(java.lang.String name)
public ContextAccessor(java.lang.String name,
java.lang.String defaultName)
| Method Detail |
|---|
protected void init(java.lang.String name)
public boolean isEmpty()
public T get(MethodContext methodContext)
public void put(MethodContext methodContext,
T value)
public T remove(MethodContext methodContext)
public T get(java.util.Map<java.lang.String,? extends java.lang.Object> theMap,
MethodContext methodContext)
public void put(java.util.Map<java.lang.String,java.lang.Object> theMap,
T value,
MethodContext methodContext)
public T remove(java.util.Map<java.lang.String,? extends java.lang.Object> theMap,
MethodContext methodContext)
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||