Class PropertyAliases

  • All Implemented Interfaces:
    Direct Known Subclasses:

    public class PropertyAliases
    extends Properties
    A properties implementation which translates the incoming name to its standard name if it is a registered alias.

    Aliases are case insensitive. One standard name may have multiple aliases.

    This is multithread safe or not depending on the status of the passed map of aliases. Cloning will not deep copy the set of aliases.

    • Constructor Summary

      Constructor Description
      PropertyAliases​(java.util.Map<java.lang.String,​> aliases)
      Creates an instance with a set of aliases.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object get​( name, java.util.Map<java.lang.String,​java.lang.String> context, substitution)  
      java.util.Map<java.lang.String,​java.lang.Object> listProperties​( property, java.util.Map<java.lang.String,​java.lang.String> context, substitution)  
      void set​( name, java.lang.Object value, java.util.Map<java.lang.String,​java.lang.String> context)  
      protected unalias​( nameOrAlias)
      Returns the standard name for an alias, or the given name if it is not a registered alias
      • Methods inherited from class

        asBoolean, asDouble, asInteger, asLong, asString, chain, clearAll, clearAll, clearAll, clearAll, clone, 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 Detail

      • PropertyAliases

        public PropertyAliases​(java.util.Map<java.lang.String,​> aliases)
        Creates an instance with a set of aliases. The given aliases will be used directly by this class. To make this class immutable and thread safe, relinquish ownership of the parameter map.
    • Method Detail

      • unalias

        protected unalias​( nameOrAlias)
        Returns the standard name for an alias, or the given name if it is not a registered alias
        nameOrAlias - the name to check if is an alias
        the real name if an alias or the input name itself
      • listProperties

        public java.util.Map<java.lang.String,​java.lang.Object> listProperties​( property,
                                                                                     java.util.Map<java.lang.String,​java.lang.String> context,
        listProperties in class
      • get

        public java.lang.Object get​( name,
                                    java.util.Map<java.lang.String,​java.lang.String> context,
        get in class
      • set

        public void set​( name,
                        java.lang.Object value,
                        java.util.Map<java.lang.String,​java.lang.String> context)
        set in class