Package weka.core
Class ProtectedProperties
- java.lang.Object
-
- java.util.Dictionary<K,V>
-
- java.util.Hashtable<java.lang.Object,java.lang.Object>
-
- java.util.Properties
-
- weka.core.ProtectedProperties
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.util.Map<java.lang.Object,java.lang.Object>,RevisionHandler
public class ProtectedProperties extends java.util.Properties implements RevisionHandler
Simple class that extends the Properties class so that the properties are unable to be modified.- Version:
- $Revision: 1.6 $
- Author:
- Richard Kirkby (rkirkby@cs.waikato.ac.nz)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ProtectedProperties(java.util.Properties props)Creates a set of protected properties from a set of normal ones.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Overrides a method to prevent the properties from being modified.java.lang.StringgetRevision()Returns the revision string.voidload(java.io.InputStream inStream)Overrides a method to prevent the properties from being modified.java.lang.Objectput(java.lang.Object key, java.lang.Object value)Overrides a method to prevent the properties from being modified.voidputAll(java.util.Map t)Overrides a method to prevent the properties from being modified.java.lang.Objectremove(java.lang.Object key)Overrides a method to prevent the properties from being modified.java.lang.ObjectsetProperty(java.lang.String key, java.lang.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
-
-
-
-
Method Detail
-
setProperty
public java.lang.Object setProperty(java.lang.String key, java.lang.String value)Overrides a method to prevent the properties from being modified.- Overrides:
setPropertyin classjava.util.Properties- Returns:
- never returns without throwing an exception.
- Throws:
java.lang.UnsupportedOperationException- always.
-
load
public void load(java.io.InputStream inStream)
Overrides a method to prevent the properties from being modified.- Overrides:
loadin classjava.util.Properties- Throws:
java.lang.UnsupportedOperationException- always.
-
clear
public void clear()
Overrides a method to prevent the properties from being modified.- Specified by:
clearin interfacejava.util.Map<java.lang.Object,java.lang.Object>- Overrides:
clearin classjava.util.Properties- Throws:
java.lang.UnsupportedOperationException- always.
-
put
public java.lang.Object put(java.lang.Object key, java.lang.Object value)Overrides a method to prevent the properties from being modified.- Specified by:
putin interfacejava.util.Map<java.lang.Object,java.lang.Object>- Overrides:
putin classjava.util.Properties- Returns:
- never returns without throwing an exception.
- Throws:
java.lang.UnsupportedOperationException- always.
-
putAll
public void putAll(java.util.Map t)
Overrides a method to prevent the properties from being modified.- Specified by:
putAllin interfacejava.util.Map<java.lang.Object,java.lang.Object>- Overrides:
putAllin classjava.util.Properties- Throws:
java.lang.UnsupportedOperationException- always.
-
remove
public java.lang.Object remove(java.lang.Object key)
Overrides a method to prevent the properties from being modified.- Specified by:
removein interfacejava.util.Map<java.lang.Object,java.lang.Object>- Overrides:
removein classjava.util.Properties- Returns:
- never returns without throwing an exception.
- Throws:
java.lang.UnsupportedOperationException- always.
-
getRevision
public java.lang.String getRevision()
Returns the revision string.- Specified by:
getRevisionin interfaceRevisionHandler- Returns:
- the revision
-
-