public class MapPropertyHandler extends Object implements org.apache.commons.jxpath.DynamicPropertyHandler
getKey(Object) to obtain a string
representation of a real object in map (key or value).
More over, you can also access directly to a key or a value, using this
syntax :
context.getValue(".[@name='key:programme2']")
context.getValue(".[@name='value:programme2']")
If the values are iterable, then will scan inot it when looking for a direct
value.DynamicPropertyHandler| Constructor and Description |
|---|
MapPropertyHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getKey(Object o)
Obtain a string representation of an object.
|
Object |
getProperty(Object object,
String propertyName) |
Object |
getPropertyKey(Map<?,?> map,
String key)
Obtain the key from the map keys which matches the given
key. |
String[] |
getPropertyNames(Object object) |
Object |
getPropertyValue(Map<?,?> map,
String value)
Obtain the value from the map values which matches the given
value. |
void |
setProperty(Object object,
String propertyName,
Object value) |
public String[] getPropertyNames(Object object)
getPropertyNames in interface org.apache.commons.jxpath.DynamicPropertyHandlerpublic Object getProperty(Object object, String propertyName)
getProperty in interface org.apache.commons.jxpath.DynamicPropertyHandlerpublic void setProperty(Object object, String propertyName, Object value)
setProperty in interface org.apache.commons.jxpath.DynamicPropertyHandlerpublic Object getPropertyKey(Map<?,?> map, String key)
key.
To compare object ot string, please refers to the method getKey(Object).map - the map to scankey - the string representation of the required key as objectnull if not found.public Object getPropertyValue(Map<?,?> map, String value)
value.
To compare object to string, please refer to the method getKey(Object).map - the map to scanvalue - the string representation of the valuenull if not found.}Copyright © 2013–2015 CodeLutin. All rights reserved.