Package com.macrofocus.common.properties

# Class OverrideProperties

java.lang.Object
com.macrofocus.common.properties.AbstractProperties<String>
com.macrofocus.common.properties.OverrideProperties

All Implemented Interfaces:
  `MutableProperties<String>`, `Properties<String>`, `Iterable<String>`

public class OverrideProperties extends AbstractProperties<String> implements MutableProperties<String>
Default data model for a collection of properties.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OverrideProperties(MutableProperties<String> defaults, MutableProperty<Boolean> overrideDefaults)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `<T> MutableProperty<T>`
  `addProperty(String name, MutableProperty<T> property)`
  `protected OverrideProperty`
  `createProperty(String name, MutableProperty<Boolean> overrideDefaults, MutableProperty defaultProperty)`
  `<T> MutableProperty<T>`
  `createProperty(String name, T value)`
  `OverrideProperty`
  `getProperty(String name)`
  `Object`
  `getValue(String name)`
  `boolean`
  `isOverrideDefaults()`
  Gets whether the default settings are overridden by these settings
  `Iterator<String>`
  `iterator()`
  `protected void`
  `registerPropertyListener(String name, MutableProperty property)`
  `<T> MutableProperty<T>`
  `replaceProperty(String name, MutableProperty<T> property)`
  `void`
  `reset()`
  `void`
  `setOverrideDefaults(boolean overrideDefaults)`
  Sets whether the default settings should be overridden by these settings
  `void`
  `setValue(String name, Object value)`

  ### Methods inherited from class com.macrofocus.common.properties.AbstractProperties

  `addPropertiesListener, addWeakPropertiesListener, notifyPropertyChanged, removePropertiesListener`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface java.lang.Iterable

  `forEach, spliterator`

  ### Methods inherited from interface com.macrofocus.common.properties.Properties

  `addPropertiesListener, addWeakPropertiesListener, removePropertiesListener`

- ## Constructor Details

  - ### OverrideProperties

    public OverrideProperties(MutableProperties<String> defaults, MutableProperty<Boolean> overrideDefaults)

- ## Method Details

  - ### iterator

    public Iterator<String> iterator()
    Specified by:
      `iterator` in interface `Iterable<String>`
    Specified by:
      `iterator` in interface `Properties<String>`

  - ### isOverrideDefaults

    public boolean isOverrideDefaults()
    Gets whether the default settings are overridden by these settings
    Returns:
      true if this override the default settings, false otherwise

  - ### setOverrideDefaults

    public void setOverrideDefaults(boolean overrideDefaults)
    Sets whether the default settings should be overridden by these settings
    Parameters:
      `overrideDefaults` - true to override the default settings, false otherwise

  - ### createProperty

    public <T> MutableProperty<T> createProperty(String name, T value)
    Specified by:
      `createProperty` in interface `MutableProperties<String>`

  - ### addProperty

    public <T> MutableProperty<T> addProperty(String name, MutableProperty<T> property)
    Specified by:
      `addProperty` in interface `MutableProperties<String>`

  - ### replaceProperty

    public <T> MutableProperty<T> replaceProperty(String name, MutableProperty<T> property)
    Specified by:
      `replaceProperty` in interface `MutableProperties<String>`

  - ### getValue

    public Object getValue(String name)
    Specified by:
      `getValue` in interface `Properties<String>`

  - ### setValue

    public void setValue(String name, Object value)
    Specified by:
      `setValue` in interface `MutableProperties<String>`

  - ### getProperty

    public OverrideProperty getProperty(String name)
    Specified by:
      `getProperty` in interface `MutableProperties<String>`
    Specified by:
      `getProperty` in interface `Properties<String>`

  - ### registerPropertyListener

    protected void registerPropertyListener(String name, MutableProperty property)

  - ### createProperty

    protected OverrideProperty createProperty(String name, MutableProperty<Boolean> overrideDefaults, MutableProperty defaultProperty)

  - ### reset

    public void reset()