| java.lang.Object org.ofbiz.base.util.FlexibleMapAccessor
FlexibleMapAccessor | public class FlexibleMapAccessor (Code) | | 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.
author: David E. Jones version: $Revision: 1.4 $ since: 2.1 |
Inner Class :public class SubMapAccessor | |
isAddAtEnd | protected boolean isAddAtEnd(Code) | | |
isAddAtIndex | protected boolean isAddAtIndex(Code) | | |
isListReference | protected boolean isListReference(Code) | | |
listIndex | protected int listIndex(Code) | | |
subMapAccessor | protected SubMapAccessor subMapAccessor(Code) | | |
FlexibleMapAccessor | public FlexibleMapAccessor(String name)(Code) | | |
get | public Object get(Map base)(Code) | | Given the name based information in this accessor, get the value from the passed in Map.
Supports LocalizedMaps by getting a String or Locale object from the base Map with the key "locale", or by explicit locale parameter.
Parameters: base - |
get | public Object get(Map base, Locale locale)(Code) | | Given the name based information in this accessor, get the value from the passed in Map.
Supports LocalizedMaps by getting a String or Locale object from the base Map with the key "locale", or by explicit locale parameter.
Note that the localization functionality is only used when the lowest level sub-map implements the LocalizedMap interface
Parameters: base - Map to get value from Parameters: locale - Optional locale parameter, if null will see if the base Map contains a "locale" key |
isEmpty | public boolean isEmpty()(Code) | | |
put | public void put(Map base, Object value)(Code) | | Given the name based information in this accessor, put the value in the passed 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.
If a "+" (plus sign) is included inside the square brackets before the index
number the value will inserted/added at that point instead of set at the point.
Parameters: base - Parameters: value - |
remove | public Object remove(Map base)(Code) | | Given the name based information in this accessor, remove the value from the passed in Map. * @param base
Parameters: base - the Map to remove from the object removed |
|
|