weka.core
Class ProtectedProperties

java.lang.Object
  extended byjava.util.Dictionary
      extended byjava.util.Hashtable
          extended byjava.util.Properties
              extended byweka.core.ProtectedProperties
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class ProtectedProperties
extends java.util.Properties

Simple class that extends the Properties class so that the properties are unable to be modified.

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

Nested Class Summary
 
Nested classes inherited from class java.util.Hashtable
 
Field Summary
private  boolean closed
           
 
Fields inherited from class java.util.Properties
defaults
 
Fields inherited from class java.util.Hashtable
 
Constructor Summary
ProtectedProperties(java.util.Properties props)
          Creates a set of protected properties from a set of normal ones.
 
Method Summary
 void clear()
          Overrides a method to prevent the properties from being modified.
 void load(java.io.InputStream inStream)
          Overrides a method to prevent the properties from being modified.
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
          Overrides a method to prevent the properties from being modified.
 void putAll(java.util.Map t)
          Overrides a method to prevent the properties from being modified.
 java.lang.Object remove(java.lang.Object key)
          Overrides a method to prevent the properties from being modified.
 java.lang.Object setProperty(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
getProperty, getProperty, list, list, propertyNames, save, store
 
Methods inherited from class java.util.Hashtable
clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, rehash, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

closed

private boolean closed
Constructor Detail

ProtectedProperties

public ProtectedProperties(java.util.Properties props)
Creates a set of protected properties from a set of normal ones.

Parameters:
props - the properties to be stored and protected.
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.

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.

Returns:
never returns without throwing an exception.
Throws:
java.lang.UnsupportedOperationException - always.

clear

public void clear()
Overrides a method to prevent the properties from being modified.

Returns:
never returns without throwing an exception.
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.

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.

Returns:
never returns without throwing an exception.
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.

Returns:
never returns without throwing an exception.
Throws:
java.lang.UnsupportedOperationException - always.