Class TaggedProperties

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,​java.lang.Object>

    public class TaggedProperties
    extends java.util.Properties
    Properties with additional attributes.
    Author:
    Alex Usun
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      TaggedProperties()
      Creates a new properties instance.
      TaggedProperties​(TaggedProperties that)
      Copy constructor.
      TaggedProperties​(java.lang.String tag)
      Creates a new properties instance.
      TaggedProperties​(java.lang.String tag, java.lang.String displayName, java.util.Properties properties)
      Creates a new properties instance.
      TaggedProperties​(java.util.ResourceBundle bundle)
      Creates a new properties instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.ResourceBundle asResourceBundle()
      Returns current properties as ResourceBundle instance.
      TaggedProperties copyWith​(java.util.Properties data, java.lang.String excludedKeysPattern)  
      boolean equals​(java.lang.Object o)  
      java.lang.String getDisplayName()
      Returns display name.
      java.lang.String getTag()
      Returns tag value.
      int hashCode()  
      java.util.Enumeration keys()  
      void setDefaults​(TaggedProperties value)
      Sets default properties.
      void setDisplayName​(java.lang.String value)
      Sets a new dispaly name.
      void setTag​(java.lang.String value)
      Sets tag value.
      java.lang.String toString()  
      • Methods inherited from class java.util.Properties

        clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, forEach, get, getOrDefault, getProperty, getProperty, isEmpty, keySet, list, list, load, load, loadFromXML, merge, propertyNames, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, save, setProperty, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, values
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TaggedProperties

        public TaggedProperties()
        Creates a new properties instance.
      • TaggedProperties

        public TaggedProperties​(java.lang.String tag)
        Creates a new properties instance.
        Parameters:
        tag - a tag value
      • TaggedProperties

        public TaggedProperties​(java.lang.String tag,
                                java.lang.String displayName,
                                java.util.Properties properties)
        Creates a new properties instance.
        Parameters:
        tag - a tag value
        displayName - properties display name
        properties - parent properties
      • TaggedProperties

        public TaggedProperties​(java.util.ResourceBundle bundle)
        Creates a new properties instance.
        Parameters:
        bundle - a resource bundle
      • TaggedProperties

        public TaggedProperties​(TaggedProperties that)
        Copy constructor.
        Parameters:
        that - instance to copy
    • Method Detail

      • getTag

        public java.lang.String getTag()
        Returns tag value.
        Returns:
        a tag value
      • setTag

        public void setTag​(java.lang.String value)
        Sets tag value.
        Parameters:
        value - new tag value
      • getDisplayName

        public java.lang.String getDisplayName()
        Returns display name.
        Returns:
        a display name
      • setDisplayName

        public void setDisplayName​(java.lang.String value)
        Sets a new dispaly name.
        Parameters:
        value - a new display name
      • setDefaults

        public void setDefaults​(TaggedProperties value)
        Sets default properties.
        Parameters:
        value - default properties
      • keys

        public java.util.Enumeration keys()
        Overrides:
        keys in class java.util.Properties
      • asResourceBundle

        public java.util.ResourceBundle asResourceBundle()
        Returns current properties as ResourceBundle instance.
        Returns:
        a ResourceBundle instance
      • copyWith

        public TaggedProperties copyWith​(java.util.Properties data,
                                         java.lang.String excludedKeysPattern)
      • equals

        public boolean equals​(java.lang.Object o)
        Specified by:
        equals in interface java.util.Map<java.lang.Object,​java.lang.Object>
        Overrides:
        equals in class java.util.Properties
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Map<java.lang.Object,​java.lang.Object>
        Overrides:
        hashCode in class java.util.Properties
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.util.Properties