org.jcoderz.commons.config
Class ConfigEntityValueImpl

java.lang.Object
  extended by org.jcoderz.commons.config.ConfigEntityValueImpl
All Implemented Interfaces:
Serializable, ConfigEntityValue

public final class ConfigEntityValueImpl
extends Object
implements ConfigEntityValue

Read only view to a typed ConfigEntity. If the members of this class are immutable instances of this class are also immutable.

Author:
fawkeZ (jCoderZ.org) $Revision: 1.9 $
See Also:
Serialized Form

Constructor Summary
ConfigEntityValueImpl(String configKey, String value)
          The public constructor of this ConfigEntityValueImpl.
 
Method Summary
 boolean equals(Object object)
          Returns true if this ConfigEntityValueImpl is equal to object.
static ConfigEntityValue fromData(ConfigEntityData data)
          Builds a ConfigEntityValue from an XDoclet-generated data object.
 String getConfigKey()
          Returns the ConfigKey.
 String getValue()
          Returns the Value.
 int hashCode()
          Override hashCode.
 ConfigEntityData toData()
          Converts this ConfigEntityValueImpl to the XDoclet-generated data object.
 String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConfigEntityValueImpl

public ConfigEntityValueImpl(String configKey,
                             String value)
The public constructor of this ConfigEntityValueImpl.

Parameters:
configKey - the ConfigKey of this entity
value - the Value of this entity
Method Detail

getConfigKey

public String getConfigKey()
Returns the ConfigKey.

Specified by:
getConfigKey in interface ConfigEntityValue
Returns:
the ConfigKey.

getValue

public String getValue()
Returns the Value.

Specified by:
getValue in interface ConfigEntityValue
Returns:
the Value.

hashCode

public int hashCode()
Override hashCode.

Overrides:
hashCode in class Object
Returns:
the Object's hashcode.

equals

public boolean equals(Object object)
Returns true if this ConfigEntityValueImpl is equal to object.

Overrides:
equals in class Object
Parameters:
object - the object to compare to.
Returns:
true if this ConfigEntityValueImpl is equal to object.

toString

public String toString()
Returns a string representation of this object.

Overrides:
toString in class Object
Returns:
a string representation of this object.

toData

public ConfigEntityData toData()
Converts this ConfigEntityValueImpl to the XDoclet-generated data object.

Specified by:
toData in interface ConfigEntityValue
Returns:
the XDoclet generated data object representing this entity

fromData

public static ConfigEntityValue fromData(ConfigEntityData data)
Builds a ConfigEntityValue from an XDoclet-generated data object.

Returns:
a ConfigEntityValue representing this entity


Copyright 2007 The jCoderZ Project.