Class PropertyMap
- java.lang.Object
-
- com.yahoo.processing.request.Properties
-
- com.yahoo.search.query.Properties
-
- com.yahoo.search.query.properties.PropertyMap
-
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
ModelObjectMap
public class PropertyMap extends Properties
A Map backing of Properties.When this is cloned it will deep copy not only the model object map, but also each clonable member inside the map.
Subclassing is supported, a hook can be implemented to provide conditional inclusion in the map. By default - all properties are accepted, so set is never propagated.
This class is not multithread safe.
- Author:
- bratseth
-
-
Constructor Summary
Constructors Constructor Description PropertyMap()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertyMap
clone()
static Object
clone(Object object)
Clones this object if it is clonable, and the clone is public.Object
get(com.yahoo.processing.request.CompoundName name, Map<String,String> context, com.yahoo.processing.request.Properties substitution)
Map<String,Object>
listProperties(com.yahoo.processing.request.CompoundName path, Map<String,String> context, com.yahoo.processing.request.Properties substitution)
Map<com.yahoo.processing.request.CompoundName,Object>
propertyMap()
Returns a direct reference to the map containing the properties set in this instance.void
set(com.yahoo.processing.request.CompoundName name, Object value, Map<String,String> context)
protected boolean
shouldSet(com.yahoo.processing.request.CompoundName name, Object value)
Return true if this value should be set in this map, false if the set should be propagated instead This default implementation always returns true.-
Methods inherited from class com.yahoo.search.query.Properties
chained, getParentQuery, setParentQuery
-
Methods inherited from class com.yahoo.processing.request.Properties
asBoolean, asDouble, asInteger, asLong, asString, chain, clearAll, clearAll, clearAll, clearAll, cloneMap, get, get, get, get, get, get, get, getBoolean, getBoolean, getBoolean, getBoolean, getDouble, getDouble, getDouble, getDouble, getInstance, getInteger, getInteger, getInteger, getInteger, getLong, getLong, getLong, getLong, getString, getString, getString, getString, listProperties, listProperties, listProperties, listProperties, listProperties, listProperties, listProperties, set, set, set
-
-
-
-
Method Detail
-
set
public void set(com.yahoo.processing.request.CompoundName name, Object value, Map<String,String> context)
- Overrides:
set
in classcom.yahoo.processing.request.Properties
-
shouldSet
protected boolean shouldSet(com.yahoo.processing.request.CompoundName name, Object value)
Return true if this value should be set in this map, false if the set should be propagated instead This default implementation always returns true.
-
get
public Object get(com.yahoo.processing.request.CompoundName name, Map<String,String> context, com.yahoo.processing.request.Properties substitution)
- Overrides:
get
in classcom.yahoo.processing.request.Properties
-
propertyMap
public Map<com.yahoo.processing.request.CompoundName,Object> propertyMap()
Returns a direct reference to the map containing the properties set in this instance.
-
clone
public PropertyMap clone()
- Overrides:
clone
in classProperties
-
listProperties
public Map<String,Object> listProperties(com.yahoo.processing.request.CompoundName path, Map<String,String> context, com.yahoo.processing.request.Properties substitution)
- Overrides:
listProperties
in classcom.yahoo.processing.request.Properties
-
-