|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.object.value.AbstractNakedValue
org.nakedobjects.object.value.Magnitude
org.nakedobjects.object.value.TimeStamp
Value object representing a date and time value.
NOTE: this class currently does not support about listeners
| Constructor Summary | |
TimeStamp()
Create a Time object for storing a timeStamp set to the current time. |
|
TimeStamp(int year,
int month,
int day,
int hour,
int minute)
Deprecated. replaced by TimeStamp(int year, int month, int day, int hour, int minute, int second) |
|
TimeStamp(int year,
int month,
int day,
int hour,
int minute,
int second)
Create a Time object for storing a timeStamp set to the specified hours and minutes. |
|
TimeStamp(TimeStamp timeStamp)
Create a Time object for storing a timeStamp set to the specified time. |
|
| Method Summary | |
void |
add(int hours,
int minutes,
int seconds)
Add the specified days, years and months to this date value. |
java.util.Calendar |
calendarValue()
|
void |
clear()
Clears the value so that it is empty, i.e. |
void |
copyObject(Naked object)
Copies the content of the specified object into this object. |
java.util.Date |
dateValue()
|
boolean |
isEmpty()
Return true if the time stamp is blank |
boolean |
isEqualTo(Magnitude timeStamp)
returns true if the time stamp of this object has the same value as the specified time |
boolean |
isLessThan(Magnitude timeStamp)
returns true if the timeStamp of this object is earlier than the specified timeStamp |
long |
longValue()
|
void |
parse(java.lang.String text)
Takes a user entry string which is parsed to set up the object. |
void |
readExternal(java.io.ObjectInput in)
|
void |
reset()
Reset this time so it contains the current time. |
void |
restoreString(java.lang.String data)
Takes a storage string and uses it reinstate this value object to its previous state/ |
java.lang.String |
saveString()
Returns a basic string representation of this value for storage purposes. |
void |
setValue(java.util.Date date)
|
void |
setValue(int year,
int month,
int day,
int hour,
int minute,
int second)
|
void |
setValue(long time)
|
void |
setValue(TimeStamp timeStamp)
|
Title |
title()
Returns a Title object describing the object. |
java.lang.String |
toString()
Returns a string representation of this object. |
void |
writeExternal(java.io.ObjectOutput out)
|
| Methods inherited from class org.nakedobjects.object.value.Magnitude |
isBetween, isGreaterThan, isGreaterThanOrEqualTo, isLessThanOrEqualTo, isSameAs, max, min |
| Methods inherited from class org.nakedobjects.object.value.AbstractNakedValue |
about, addNakedValueListener, checkCanOperate, contextualTitle, deepCopy, dumpObject, fireValueChanged, fireValueChanged, getClassName, getFullClassName, getLogger, getObjectHelpText, isNull, isValid, nakedValueListeners, removeNakedValueListener, setAbout, setNull, setValidity, summary |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public TimeStamp()
public TimeStamp(int year,
int month,
int day,
int hour,
int minute)
public TimeStamp(int year,
int month,
int day,
int hour,
int minute,
int second)
public TimeStamp(TimeStamp timeStamp)
| Method Detail |
public void add(int hours,
int minutes,
int seconds)
public void clear()
NakedValueisEmpty returns true.
clear in interface NakedValuepublic void copyObject(Naked object)
Naked
copyObject in interface Nakedpublic java.util.Date dateValue()
public boolean isEmpty()
isEmpty in interface Nakedpublic boolean isEqualTo(Magnitude timeStamp)
isEqualTo in class Magnitudepublic boolean isLessThan(Magnitude timeStamp)
isLessThan in class Magnitudepublic long longValue()
public void parse(java.lang.String text)
throws ValueParseException
NakedValue
parse in interface NakedValueValueParseExceptionNakedValue.restoreString(String)
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException
java.lang.ClassNotFoundExceptionpublic void reset()
reset in interface NakedValueNakedValue.reset()public void setValue(java.util.Date date)
public void setValue(long time)
public void setValue(TimeStamp timeStamp)
public void setValue(int year,
int month,
int day,
int hour,
int minute,
int second)
public Title title()
Naked
title in interface Naked
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic java.util.Calendar calendarValue()
public void restoreString(java.lang.String data)
NakedValue
restoreString in interface NakedValuedata - NakedValue.parse(String)public java.lang.String saveString()
NakedValue
saveString in interface NakedValuepublic java.lang.String toString()
AbstractNakedValueThe specification of this string representation is not fixed, but, at the time of writing, consists of title [shortNakedClassName]
toString in class AbstractNakedValue
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||