Module tvbrowser
Package util.misc

Class ChangeTrackingProperties

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

    public class ChangeTrackingProperties
    extends java.util.Properties
    properties implementation which tracks changes and only stores itself to disk if there were changes in the properties collection
    Author:
    Bananeweizen
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class java.util.Properties

        defaults
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean changed()
      whether or not the properties stored in this object have changed since object creation
      java.lang.Object setProperty​(java.lang.String key, java.lang.String value)  
      void store​(java.io.File file)  
      • Methods inherited from class java.util.Properties

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

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

      • ChangeTrackingProperties

        public ChangeTrackingProperties()
    • Method Detail

      • setProperty

        public java.lang.Object setProperty​(java.lang.String key,
                                            java.lang.String value)
        Overrides:
        setProperty in class java.util.Properties
      • changed

        public boolean changed()
        whether or not the properties stored in this object have changed since object creation
        Returns:
        changed
      • store

        public void store​(java.io.File file)
                   throws java.io.IOException
        Throws:
        java.io.IOException