|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.ds.fw.types.FwSimpleObject
|
+--com.ds.fw.types.data.FwTime
| Field Summary | |
int |
_hour
|
int |
_millisecond
|
int |
_minute
|
int |
_second
|
| Constructor Summary | |
FwTime()
Create a new Date with the default date of Jan 1st, FIRST YEAR. |
|
| Method Summary | |
boolean |
addHour()
Adds an hour to the time |
int |
addHours(int n)
Adds(substracts) hours |
boolean |
addMillisecond()
Adds a millisecond to the time |
int |
addMilliseconds(int n)
Adds(substracts) milliseconds to the time |
boolean |
addMinute()
Adds a minute to the time |
int |
addMinutes(int n)
Adds(substracts) minutes |
boolean |
addSecond()
Adds a second to the time |
int |
addSeconds(int n)
Adds(substracts) seconds |
void |
beNow()
Sets the date to be the current date |
static com.ds.fw.types.data.FwTimeIF |
createNow()
Create a new date with the current time. |
static com.ds.fw.types.data.FwTimeIF |
createTime(java.lang.String s)
Create a time from a string in the format "hh:mm:ss". |
boolean |
equals(java.lang.Object o)
Compares if this FwTime object is equal to the object given as parameter |
boolean |
fromString(java.lang.String s)
Set the time by parsing a string in the format hh:mm:ss. |
int |
getHour()
Gets the hour |
java.util.Date |
getJavaDate()
Gets the date |
java.util.Date |
getJavaDateWithoutMilliseconds()
Gets the date without milliseconds |
int |
getMillisecond()
Gets the milliseconds |
int |
getMinute()
Gets the minutes |
static com.ds.fw.types.data.FwTimeIF |
getNow()
Create a new date with the current time. |
int |
getSecond()
Gets the seconds |
com.ds.fw.types.data.FwTimeIF |
getTimeCopy()
|
int |
hashCode()
Generate a hash code for this object |
boolean |
isAfter(com.ds.fw.types.data.FwTimeIF t)
Verify if the time represented by this FwTime object is after this given as parameter |
boolean |
isBefore(com.ds.fw.types.data.FwTimeIF t)
Verify if the time represented by this FwTime object is before this given as parameter |
void |
setHour(int o)
Sets the hour |
void |
setJavaDate(java.util.Date d)
Sets the date with new one |
void |
setMillisecond(int o)
Sets the milliseconds |
void |
setMinute(int o)
Sets the minutes |
void |
setSecond(int o)
Sets the seconds |
boolean |
subtractHour()
Substracts an hour |
boolean |
subtractMillisecond()
Substracts a millisecond |
boolean |
subtractMinute()
Substracts a minute |
boolean |
subtractSecond()
Substracts a second |
java.lang.String |
toStringValue()
Returns the string representation of the time with format "hs:ms:ss" |
| Methods inherited from class com.ds.fw.types.FwSimpleObject |
getClassName, getClone, getCopy, getCopy, getDeepCopy, getDisplayString, getDisplayStringFor, postCopy, printStackTrace, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.ds.fw.types.FwSimpleObjectIF |
getClassName, getClone, getCopy, getCopy, getDeepCopy, getDisplayString, getDisplayStringFor, postCopy, toString |
| Field Detail |
public int _hour
public int _minute
public int _second
public int _millisecond
| Constructor Detail |
public FwTime()
| Method Detail |
public static com.ds.fw.types.data.FwTimeIF getNow()
public static com.ds.fw.types.data.FwTimeIF createNow()
public static com.ds.fw.types.data.FwTimeIF createTime(java.lang.String s)
public int getHour()
getHour in interface FwTimeIFpublic void setHour(int o)
setHour in interface FwTimeIFo - - the new valuepublic int getMinute()
getMinute in interface FwTimeIFpublic void setMinute(int o)
setMinute in interface FwTimeIFo - - the new value for the minutespublic int getSecond()
getSecond in interface FwTimeIFpublic void setSecond(int o)
setSecond in interface FwTimeIFo - - the new value for the secondspublic int getMillisecond()
getMillisecond in interface FwTimeIFpublic void setMillisecond(int o)
setMillisecond in interface FwTimeIFo - - the new value for the millisecondspublic void beNow()
beNow in interface FwTimeIFpublic java.util.Date getJavaDate()
getJavaDate in interface FwTimeIFpublic java.util.Date getJavaDateWithoutMilliseconds()
getJavaDateWithoutMilliseconds in interface FwTimeIFpublic void setJavaDate(java.util.Date d)
setJavaDate in interface FwTimeIFd - - the new datepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - - the object to be compared for equality with this FwTime object
public int hashCode()
hashCode in class java.lang.Objectpublic boolean isBefore(com.ds.fw.types.data.FwTimeIF t)
isBefore in interface FwTimeIFt -
public boolean isAfter(com.ds.fw.types.data.FwTimeIF t)
isAfter in interface FwTimeIFt -
public java.lang.String toStringValue()
toStringValue in interface FwSimpleObjectIFtoStringValue in class FwSimpleObjectpublic boolean fromString(java.lang.String s)
fromString in interface FwTimeIFpublic boolean addMillisecond()
addMillisecond in interface FwTimeIFpublic boolean addSecond()
addSecond in interface FwTimeIFpublic boolean addMinute()
addMinute in interface FwTimeIFpublic boolean addHour()
addHour in interface FwTimeIFpublic boolean subtractMillisecond()
subtractMillisecond in interface FwTimeIFpublic boolean subtractSecond()
subtractSecond in interface FwTimeIFpublic boolean subtractMinute()
subtractMinute in interface FwTimeIFpublic boolean subtractHour()
subtractHour in interface FwTimeIFpublic int addMilliseconds(int n)
addMilliseconds in interface FwTimeIFn - - the number of milliseconds to be added(or substracted if n<0)
public int addSeconds(int n)
addSeconds in interface FwTimeIFn - - the number of the seconds to be added (or substracted if n<0)
public int addMinutes(int n)
addMinutes in interface FwTimeIFn - - the number of the minutes to be added( or substracted if n < 0)
public int addHours(int n)
addHours in interface FwTimeIFn - - the number of hours to be added(substracted if n < 0)
public com.ds.fw.types.data.FwTimeIF getTimeCopy()
getTimeCopy in interface FwTimeIF
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||