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
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    static Object
    clone(Object object)
    Clones this object if it is clonable, and the clone is public.
    get(com.yahoo.processing.request.CompoundName name, Map<String,String> context, com.yahoo.processing.request.Properties substitution)
     
    listProperties(com.yahoo.processing.request.CompoundName path, Map<String,String> context, com.yahoo.processing.request.Properties substitution)
     
    Map<com.yahoo.processing.request.CompoundName,Object>
    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, requireSettable, 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

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PropertyMap

      public PropertyMap()
  • Method Details

    • set

      public void set(com.yahoo.processing.request.CompoundName name, Object value, Map<String,String> context)
      Overrides:
      set in class com.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 class com.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 class Properties
    • 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 class com.yahoo.processing.request.Properties
    • clone

      public static Object clone(Object object)
      Clones this object if it is clonable, and the clone is public. Returns null if not