|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--org.mmbase.util.RelativeTime
This util class contains several methods and constants to manipulate relative time values. The relative time value has to be provided as either one integer value (representing the time in milliseconds), or as a set of time attribute integers (hours,minutes,seconds and milliseconds).
| Constructor Summary | |
RelativeTime()
|
|
| Method Summary | |
static java.lang.String |
convertIntToTime(int timeValue)
Converts an integer (representing the time in milliseconds) to a string (like "12:42:15.020") |
static int |
convertTimeToInt(int h,
int m,
int s,
int ms)
Converts the time attribute values to one integer representing the time in milliseconds. |
static int |
convertTimeToInt(java.lang.String time)
Converts a string (like "12:42:15.020") to milliseconds |
static int |
getHours(int timeValue)
Retrieves the amount of hours that are left in the timeValue variable (representing the time in milliseconds). |
static int |
getMillis(int timeValue)
Retrieves the amount of milliseconds that are left in the timeValue variable (representing the time in milliseconds). |
static int |
getMinutes(int timeValue)
Retrieves the amount of minutes that are left in the timeValue variable (representing the time in milliseconds). |
static int |
getSeconds(int timeValue)
Retrieves the amount of seconds that are left in the timeValue variable (representing the time in milliseconds). |
static void |
main(java.lang.String[] args)
Entry point for calling this class from commandline. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RelativeTime()
| Method Detail |
public static int getHours(int timeValue)
timeValue - An integer which holds the relative time value.public static int getMinutes(int timeValue)
timeValue - An integer which holds the relative time value.public static int getSeconds(int timeValue)
timeValue - An integer which holds the relative time value.public static int getMillis(int timeValue)
timeValue - An integer which holds the relative time value.public static java.lang.String convertIntToTime(int timeValue)
time - The amount of time in milliseconds.
public static int convertTimeToInt(int h,
int m,
int s,
int ms)
h - The amount of hoursm - The amount of minutess - The amount of secondsms - The amount of millispublic static int convertTimeToInt(java.lang.String time)
time - A string which contains the relative time in the format "hours:minutes:seconds.millis"public static void main(java.lang.String[] args)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||