ca.bc.gov.webade.preferences
Class DefaultWebADEPreference

java.lang.Object
  extended byca.bc.gov.webade.preferences.DefaultWebADEPreference
All Implemented Interfaces:
java.io.Serializable, WebADEPreference

public final class DefaultWebADEPreference
extends java.lang.Object
implements WebADEPreference, java.io.Serializable

Author:
jross
See Also:
Serialized Form

Constructor Summary
DefaultWebADEPreference(java.lang.String preferenceName)
          Creates a new preference with the given name.
 
Method Summary
 java.lang.Object clone()
          see java.lang.Object#clone()
 boolean equals(java.lang.Object obj)
           
 java.lang.String getPreferenceName()
           
 java.lang.String getPreferenceValue()
           
 int hashCode()
           
 void setPreferenceValue(java.lang.String preferenceValue)
          Sets the given value as the preference value, erasing all other preference values that may already be set for this preference.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultWebADEPreference

public DefaultWebADEPreference(java.lang.String preferenceName)
Creates a new preference with the given name.

Parameters:
preferenceName - The name of the preference.
Throws:
java.lang.NullPointerException - Thrown if the preference name parameter was null.
Method Detail

getPreferenceName

public final java.lang.String getPreferenceName()
Specified by:
getPreferenceName in interface WebADEPreference
Returns:
Returns the preferenceName.

getPreferenceValue

public final java.lang.String getPreferenceValue()
                                          throws java.lang.IllegalStateException
Specified by:
getPreferenceValue in interface WebADEPreference
Returns:
Returns the preference value assigned to the preference name.
Throws:
java.lang.IllegalStateException - Thrown if the preference contains multiple values.

setPreferenceValue

public final void setPreferenceValue(java.lang.String preferenceValue)
Sets the given value as the preference value, erasing all other preference values that may already be set for this preference.

Specified by:
setPreferenceValue in interface WebADEPreference
Parameters:
preferenceValue - The preference value to set.

equals

public final boolean equals(java.lang.Object obj)
See Also:
Object.equals(java.lang.Object)

toString

public final java.lang.String toString()
See Also:
Object.toString()

hashCode

public final int hashCode()
See Also:
Object.hashCode()

clone

public java.lang.Object clone()
see java.lang.Object#clone()

Specified by:
clone in interface WebADEPreference