Class PropertiesPropertySet

  • All Implemented Interfaces:
    PropertySet

    public class PropertiesPropertySet
    extends java.lang.Object
    implements PropertySet
    A property set based on an underlying Properties object. Knows how to finds Properties files within a module and to converts them into PropertySet objects.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  PropertiesPropertySet.Source
      Knows how to find all the property files in a module and create PropertiesPropertySets from them.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Set<java.lang.String> _keys  
      private java.lang.String _name  
      private java.util.Properties _properties  
    • Constructor Summary

      Constructors 
      Constructor Description
      PropertiesPropertySet​(java.lang.String name, java.util.Properties properties)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<java.lang.String> getKeys()
      The set of keys which can be used to look up values in this property set
      java.lang.String getName()
      The name of the property set, which will be used as the name of the type
      private java.util.Set<java.lang.String> getStringPropertyNames​(java.util.Properties properties)  
      java.lang.String getValue​(java.lang.String key)
      Get the value corresponding to the given key
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • _name

        private final java.lang.String _name
      • _keys

        private final java.util.Set<java.lang.String> _keys
      • _properties

        private final java.util.Properties _properties
    • Constructor Detail

      • PropertiesPropertySet

        public PropertiesPropertySet​(java.lang.String name,
                                     java.util.Properties properties)
    • Method Detail

      • getKeys

        public java.util.Set<java.lang.String> getKeys()
        Description copied from interface: PropertySet
        The set of keys which can be used to look up values in this property set
        Specified by:
        getKeys in interface PropertySet
        Returns:
        a non null set containing the keys
      • getName

        public java.lang.String getName()
        Description copied from interface: PropertySet
        The name of the property set, which will be used as the name of the type
        Specified by:
        getName in interface PropertySet
        Returns:
        a non null name
      • getValue

        public java.lang.String getValue​(java.lang.String key)
        Description copied from interface: PropertySet
        Get the value corresponding to the given key
        Specified by:
        getValue in interface PropertySet
        Parameters:
        key - the key, never null
        Returns:
        the value corresponding to the given key or null if there is no corresponding value
      • getStringPropertyNames

        private java.util.Set<java.lang.String> getStringPropertyNames​(java.util.Properties properties)