Package weka.core

# Class ProtectedProperties

java.lang.Object
java.util.Dictionary<K,V>
java.util.Hashtable<Object,Object>
java.util.Properties
weka.core.ProtectedProperties

All Implemented Interfaces:
  `Serializable`, `Cloneable`, `Map<Object,Object>`, `RevisionHandler`

public class ProtectedProperties extends Properties implements RevisionHandler
Simple class that extends the Properties class so that the properties are unable to be modified.

Version:
  $Revision: 10203 $
Author:
  Richard Kirkby (rkirkby@cs.waikato.ac.nz)
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ProtectedProperties(Properties props)`
  Creates a set of protected properties from a set of normal ones.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `clear()`
  Overrides a method to prevent the properties from being modified.
  `String`
  `getRevision()`
  Returns the revision string.
  `void`
  `load(InputStream inStream)`
  Overrides a method to prevent the properties from being modified.
  `Object`
  `put(Object key, Object value)`
  Overrides a method to prevent the properties from being modified.
  `void`
  `putAll(Map<? extends Object,? extends Object> t)`
  Overrides a method to prevent the properties from being modified.
  `Object`
  `remove(Object key)`
  Overrides a method to prevent the properties from being modified.
  `Object`
  `setProperty(String key, String value)`
  Overrides a method to prevent the properties from being modified.

  ### Methods inherited from class java.util.Properties

  `clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, getProperty, getProperty, hashCode, isEmpty, keys, keySet, list, list, load, loadFromXML, merge, propertyNames, putIfAbsent, remove, replace, replace, replaceAll, save, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, toString, values`

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

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ProtectedProperties

    public ProtectedProperties(Properties props)
    Creates a set of protected properties from a set of normal ones.
    Parameters:
      `props` - the properties to be stored and protected.

- ## Method Details

  - ### setProperty

    public Object setProperty(String key, String value)
    Overrides a method to prevent the properties from being modified.
    Overrides:
      `setProperty` in class `Properties`
    Returns:
      never returns without throwing an exception.
    Throws:
      `UnsupportedOperationException` - always.

  - ### load

    public void load(InputStream inStream)
    Overrides a method to prevent the properties from being modified.
    Overrides:
      `load` in class `Properties`
    Throws:
      `UnsupportedOperationException` - always.

  - ### clear

    public void clear()
    Overrides a method to prevent the properties from being modified.
    Specified by:
      `clear` in interface `Map<Object,Object>`
    Overrides:
      `clear` in class `Properties`
    Throws:
      `UnsupportedOperationException` - always.

  - ### put

    public Object put(Object key, Object value)
    Overrides a method to prevent the properties from being modified.
    Specified by:
      `put` in interface `Map<Object,Object>`
    Overrides:
      `put` in class `Properties`
    Returns:
      never returns without throwing an exception.
    Throws:
      `UnsupportedOperationException` - always.

  - ### putAll

    public void putAll(Map<? extends Object,? extends Object> t)
    Overrides a method to prevent the properties from being modified.
    Specified by:
      `putAll` in interface `Map<Object,Object>`
    Overrides:
      `putAll` in class `Properties`
    Throws:
      `UnsupportedOperationException` - always.

  - ### remove

    public Object remove(Object key)
    Overrides a method to prevent the properties from being modified.
    Specified by:
      `remove` in interface `Map<Object,Object>`
    Overrides:
      `remove` in class `Properties`
    Returns:
      never returns without throwing an exception.
    Throws:
      `UnsupportedOperationException` - always.

  - ### getRevision

    public String getRevision()
    Returns the revision string.
    Specified by:
      `getRevision` in interface `RevisionHandler`
    Returns:
      the revision