Class DoubleProperties

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

    public final class DoubleProperties
    extends java.util.Properties
    A properties object that links two independent properties together. The read property set is always searched first, with the write property set being second. But any put() calls are always made directly to the write object. Only the put(), propertyNames() and getProperty() methods are supported by this class.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Properties read  
      private java.util.Properties write  
      • Fields inherited from class java.util.Properties

        defaults
    • Constructor Summary

      Constructors 
      Constructor Description
      DoubleProperties​(java.util.Properties read, java.util.Properties write)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private static void addAllNames​(java.util.Properties src, java.util.HashSet<java.lang.Object> dest)
      Add all property names in the Properties object src to the HashSet dest.
      java.lang.String getProperty​(java.lang.String key)  
      java.lang.String getProperty​(java.lang.String key, java.lang.String defaultValue)  
      java.util.Enumeration<java.lang.Object> propertyNames()  
      java.lang.Object put​(java.lang.Object key, java.lang.Object value)  
      • Methods inherited from class java.util.Properties

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

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • read

        private final java.util.Properties read
      • write

        private final java.util.Properties write
    • Constructor Detail

      • DoubleProperties

        public DoubleProperties​(java.util.Properties read,
                                java.util.Properties write)
    • Method Detail

      • put

        public java.lang.Object put​(java.lang.Object key,
                                    java.lang.Object value)
        Specified by:
        put in interface java.util.Map<java.lang.Object,​java.lang.Object>
        Overrides:
        put in class java.util.Properties
      • getProperty

        public java.lang.String getProperty​(java.lang.String key)
        Overrides:
        getProperty in class java.util.Properties
      • getProperty

        public java.lang.String getProperty​(java.lang.String key,
                                            java.lang.String defaultValue)
        Overrides:
        getProperty in class java.util.Properties
      • propertyNames

        public java.util.Enumeration<java.lang.Object> propertyNames()
        Overrides:
        propertyNames in class java.util.Properties
      • addAllNames

        private static void addAllNames​(java.util.Properties src,
                                        java.util.HashSet<java.lang.Object> dest)
        Add all property names in the Properties object src to the HashSet dest.