org.apache.turbine.om
Class DateKey
java.lang.Object
|
+--org.apache.turbine.om.ObjectKey
|
+--org.apache.turbine.om.SimpleKey
|
+--org.apache.turbine.om.DateKey
- All Implemented Interfaces:
- java.lang.Comparable, java.io.Serializable
- public class DateKey
- extends SimpleKey
This class can be used as an ObjectKey to uniquely identify an
object within an application where the id is a Date.
- See Also:
- Serialized Form
Fields inherited from class org.apache.turbine.om.ObjectKey |
key |
Constructor Summary |
DateKey()
Creates an DateKey whose internal representation will be
set later, through a set method |
DateKey(java.util.Date key)
Creates a DateKey |
DateKey(DateKey key)
Creates a DateKey that is equivalent to key. |
DateKey(java.lang.String key)
Creates a DateKey whose internal representation is a Date
given by the long number given by the String |
Method Summary |
boolean |
equals(java.lang.Object keyObj)
keyObj is equal to this DateKey if keyObj is a DateKey or String
that contains the same information this key contains. |
java.util.Date |
getDate()
Access the underlying Date object. |
void |
setValue(DateKey key)
Sets the internal representation to the same object used
by key. |
void |
setValue(java.lang.String key)
Sets the internal representation to a String |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
, clone, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait |
DateKey
public DateKey()
- Creates an DateKey whose internal representation will be
set later, through a set method
DateKey
public DateKey(java.lang.String key)
throws java.lang.NumberFormatException
- Creates a DateKey whose internal representation is a Date
given by the long number given by the String
DateKey
public DateKey(java.util.Date key)
- Creates a DateKey
DateKey
public DateKey(DateKey key)
- Creates a DateKey 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(DateKey key)
- Sets the internal representation to the same object used
by key.
getDate
public java.util.Date getDate()
- Access the underlying Date object.
- Returns:
- a
Date
value
equals
public boolean equals(java.lang.Object keyObj)
- keyObj is equal to this DateKey if keyObj is a DateKey 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.