|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjd.util.Time
Time represents a time.
Constructor Summary | |
Time()
Create a Time object for the current system time. |
|
Time(Calendar cal)
Create a time from a Calendar. |
|
Time(int hour,
int minute,
int second)
Create a new Time. |
|
Time(long time)
Create a new Time. |
|
Time(Time time)
Create a Time from the given Time. |
Method Summary | |
Object |
clone()
Return a copy of this Time. |
boolean |
equals(Object time)
Test if the given Time object represents the same time. |
int |
getHour()
Return the hour. |
int |
getMinute()
Return the minute. |
int |
getSecond()
Return the second. |
boolean |
isAfter(Time t)
Test if this time is after the given time. |
boolean |
isBefore(Time t)
Test if this time is before the given time. |
static boolean |
isValidTime(int hour,
int minute,
int second)
Test if the given values represent a valid time. |
static Time |
now()
Return the current system time. |
int |
toInteger()
Return an integer representation of this date. |
String |
toString()
Return a string representation of this date in the form hh:mm:ss. |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Time()
public Time(long time)
time
- the specified number of milliseconds since the standard base time
known as "the epoch", namely January 1, 1970, 00:00:00 GMT.public Time(Calendar cal)
public Time(int hour, int minute, int second)
hour
- a value between 0 and 23.minute
- a value between 0 and 59.second
- a value between 0 and 59.public Time(Time time)
Method Detail |
public static Time now()
public int getSecond()
public int getMinute()
public int getHour()
public boolean equals(Object time)
public boolean isBefore(Time t)
public boolean isAfter(Time t)
public static boolean isValidTime(int hour, int minute, int second)
public Object clone()
public String toString()
public int toInteger()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |