|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.console.util.DaysHoursMinutesSeconds
public class DaysHoursMinutesSeconds
Class which holds a time amount as a number of days, hours, minutes, and seconds.
Constructor Summary | |
---|---|
DaysHoursMinutesSeconds(int seconds)
Constructor converting a number of seconds to a number of days, hours, minutes, and seconds. |
|
DaysHoursMinutesSeconds(int d,
int h,
int m)
Constructor using 0 for seconds. |
|
DaysHoursMinutesSeconds(int d,
int h,
int m,
int s)
Constructor. |
|
DaysHoursMinutesSeconds(long milliseconds)
Constructor converting a number of milliseconds to a number of days, hours, minutes, and seconds. |
Method Summary | |
---|---|
int |
getDays()
Return number of days. |
int |
getHours()
Return number of hours. |
int |
getMinutes()
Return number of minutes. |
int |
getSeconds()
Return number of seconds. |
float |
getSecondsWithDecimal()
Return number of seconds including decimal portion. |
static void |
printMethodCallDurationMessage(java.lang.String methodName,
java.util.Date startingTime,
java.util.Date endingTime)
|
java.lang.String |
toDisplayString(boolean includeSeconds)
Display the time amount in the form of: |
java.lang.String |
toString()
Overridden toString(). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DaysHoursMinutesSeconds(int d, int h, int m, int s)
d
- number of daysh
- number of hoursm
- number of minutess
- number of secondspublic DaysHoursMinutesSeconds(int d, int h, int m)
d
- number of daysh
- number of hoursm
- number of minutespublic DaysHoursMinutesSeconds(int seconds)
seconds
- total number of secondspublic DaysHoursMinutesSeconds(long milliseconds)
milliseconds
- total number of millisecondsMethod Detail |
---|
public static void printMethodCallDurationMessage(java.lang.String methodName, java.util.Date startingTime, java.util.Date endingTime)
public int getDays()
public int getHours()
public int getMinutes()
public int getSeconds()
public float getSecondsWithDecimal()
public java.lang.String toDisplayString(boolean includeSeconds)
"d days, h hours, m minutes" or "d days, h hours, m minutes, s seconds" where: leading time units whose value is 0 are not displayed ex: "5 hours, 10 minutes" rather than "0 days, 5 hours, 10 minutes" and: a value of 1 is given as a singular. ("1 day", not "1 days").
includeSeconds
- true if including seconds
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |