org.apache.turbine.om
Class StringKey
java.lang.Object
|
+--org.apache.turbine.om.ObjectKey
|
+--org.apache.turbine.om.SimpleKey
|
+--org.apache.turbine.om.StringKey
- All Implemented Interfaces:
- java.lang.Comparable, java.io.Serializable
- public class StringKey
- extends SimpleKey
This class can be used as an ObjectKey to uniquely identify an
object within an application where the id consists
of a single entity such a GUID or the value of a db row's primary key.
- See Also:
- Serialized Form
Fields inherited from class org.apache.turbine.om.ObjectKey |
key |
Constructor Summary |
StringKey()
Creates an SimpleKey whose internal representation will be
set later, through a set method |
StringKey(java.lang.String key)
Creates a StringKey whose internal representation is a String |
StringKey(StringKey key)
Creates a StringKey that is equivalent to key. |
Method Summary |
boolean |
equals(java.lang.Object keyObj)
keyObj is equal to this StringKey if keyObj is a StringKey or String
that contains the same information this key contains. |
java.lang.String |
getString()
Access the underlying String object. |
void |
setValue(java.lang.String key)
Sets the internal representation to a String |
void |
setValue(StringKey key)
Sets the internal representation to the same object used
by key. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
, clone, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait |
StringKey
public StringKey()
- Creates an SimpleKey whose internal representation will be
set later, through a set method
StringKey
public StringKey(java.lang.String key)
- Creates a StringKey whose internal representation is a String
StringKey
public StringKey(StringKey key)
- Creates a StringKey that is equivalent to key.
setValue
public void setValue(java.lang.String key)
- Sets the internal representation to a String
- Overrides:
setValue
in class ObjectKey
- Following copied from class:
org.apache.turbine.om.ObjectKey
- Parameters:
s
- a String
value- Throws:
TurbineException
- if an error occurs
setValue
public void setValue(StringKey key)
- Sets the internal representation to the same object used
by key.
getString
public java.lang.String getString()
- Access the underlying String object.
- Returns:
- a
String
value
equals
public boolean equals(java.lang.Object keyObj)
- keyObj is equal to this StringKey if keyObj is a StringKey or String
that contains the same information this key contains.
- Overrides:
equals
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.