Package com.macrofocus.common.properties

# Class EnumOverrideProperties<K>

java.lang.Object
com.macrofocus.common.properties.AbstractProperties<K>
com.macrofocus.common.properties.EnumOverrideProperties<K>

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

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `EnumOverrideProperties(Class<K> types, EnumProperties<K> defaults, MutableProperty<Boolean> overrideDefaults)`

- ## Method Summary

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

  - ### EnumOverrideProperties

    public EnumOverrideProperties(Class<K> types, EnumProperties<K> defaults, MutableProperty<Boolean> overrideDefaults)

- ## Method Details

  - ### iterator

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

  - ### 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(K name, T value)
    Specified by:
      `createProperty` in interface `MutableProperties<K>`

  - ### addProperty

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

  - ### replaceProperty

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

  - ### getValue

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

  - ### setValue

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

  - ### getProperty

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

  - ### registerPropertyListener

    protected void registerPropertyListener(K name, MutableProperty property)

  - ### createProperty

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

  - ### reset

    public void reset()