public class DateHolder extends ValueHolder
Date
value.Modifier and Type | Field and Description |
---|---|
protected Date |
value
The current value.
|
subtype
Constructor and Description |
---|
DateHolder()
Construct a new
DateHolder with an initial value of the
current date and time, and a default subtype of
FormatConstants.DATE_FORMAT . |
DateHolder(Date value)
Construct a new
DateHolder with a specified initial
value, and a default subtype of
FormatConstants.DATE_FORMAT . |
DateHolder(Date value,
int subtype)
Construct a new
DateHolder with a specified initial
value and subtype. |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object other)
Compare this holder object to another.
|
Date |
getValue()
Get the
DateHolder 's value. |
void |
setValue(Date value)
Set the
DateHolder 's value. |
String |
toString()
Get a string representation for this object.
|
getSubtype, setSubtype
public DateHolder()
DateHolder
with an initial value of the
current date and time, and a default subtype of
FormatConstants.DATE_FORMAT
.FormatConstants
public DateHolder(Date value)
DateHolder
with a specified initial
value, and a default subtype of
FormatConstants.DATE_FORMAT
.value
- The initial value.public DateHolder(Date value, int subtype)
DateHolder
with a specified initial
value and subtype. A subtype is particularly useful for a
Date
object, since it may be used to specify which part
of the value is significant (such as the date, the time, or both).value
- The initial value.public final void setValue(Date value)
DateHolder
's value.value
- The new value.public int compareTo(Object other)
compareTo
in interface Comparable
compareTo
in class ValueHolder
other
- The ValueHolder
to compare against.-1
if this object is "less than" the other object;
1
if this object is "greater than" the other object, and
0
if the objects are "equal."WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses