Package weka.core
Class ProtectedProperties
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<Object,
,Object> 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:
-
Constructor Summary
ConstructorDescriptionProtectedProperties
(Properties props) Creates a set of protected properties from a set of normal ones. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Overrides a method to prevent the properties from being modified.Returns the revision string.void
load
(InputStream inStream) Overrides a method to prevent the properties from being modified.Overrides a method to prevent the properties from being modified.void
Overrides a method to prevent the properties from being modified.Overrides a method to prevent the properties from being modified.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
-
Constructor Details
-
ProtectedProperties
Creates a set of protected properties from a set of normal ones.- Parameters:
props
- the properties to be stored and protected.
-
-
Method Details
-
setProperty
Overrides a method to prevent the properties from being modified.- Overrides:
setProperty
in classProperties
- Returns:
- never returns without throwing an exception.
- Throws:
UnsupportedOperationException
- always.
-
load
Overrides a method to prevent the properties from being modified.- Overrides:
load
in classProperties
- Throws:
UnsupportedOperationException
- always.
-
clear
public void clear()Overrides a method to prevent the properties from being modified.- Specified by:
clear
in interfaceMap<Object,
Object> - Overrides:
clear
in classProperties
- Throws:
UnsupportedOperationException
- always.
-
put
Overrides a method to prevent the properties from being modified.- Specified by:
put
in interfaceMap<Object,
Object> - Overrides:
put
in classProperties
- Returns:
- never returns without throwing an exception.
- Throws:
UnsupportedOperationException
- always.
-
putAll
Overrides a method to prevent the properties from being modified.- Specified by:
putAll
in interfaceMap<Object,
Object> - Overrides:
putAll
in classProperties
- Throws:
UnsupportedOperationException
- always.
-
remove
Overrides a method to prevent the properties from being modified.- Specified by:
remove
in interfaceMap<Object,
Object> - Overrides:
remove
in classProperties
- Returns:
- never returns without throwing an exception.
- Throws:
UnsupportedOperationException
- always.
-
getRevision
Returns the revision string.- Specified by:
getRevision
in interfaceRevisionHandler
- Returns:
- the revision
-