public class CumulativeTime
extends java.lang.Object
Constructor and Description |
---|
CumulativeTime()
Constructs a new initialized time value.
|
CumulativeTime(CumulativeTime beginTime,
CumulativeTime endTime)
Constructs a new time value as period given by the difference of to time
values.
|
CumulativeTime(int hhmmss)
Constructs a new time value.
|
CumulativeTime(int hours,
int minutes)
Constructs a new time value.
|
CumulativeTime(int hours,
int minutes,
int seconds)
Constructs a new time value.
|
CumulativeTime(TimeString timeString)
Constructs a new time value.
|
Modifier and Type | Method and Description |
---|---|
void |
add(CumulativeTime time)
Adds the specified time to this time
|
double |
getHoursAsDecimalValue()
Returns the time as a decimal value, e.g. 27 hours and 45 minutes would
return 27.75 hours
|
java.lang.String |
getTimeViewWithoutSeconds()
Returns the time as a string without seconds, e.g. 23:45
|
java.lang.String |
getTimeViewWithSeconds()
Returns the time as a string with seconds, e.g. 23:45:00
|
void |
subtract(CumulativeTime time)
Subtracts the specified time to this time.
|
java.lang.String |
toString() |
public CumulativeTime()
public CumulativeTime(TimeString timeString)
timeString
- public CumulativeTime(int hhmmss)
hhmmss
- public CumulativeTime(int hours, int minutes)
hours
- the amount of hours of the timeminutes
- the amount of minutes of the timepublic CumulativeTime(int hours, int minutes, int seconds)
hours
- the amount of hours of the timeminutes
- the amount of minutes of the timeseconds
- the seconds of minutes of the timepublic CumulativeTime(CumulativeTime beginTime, CumulativeTime endTime)
beginTime
- the begin of the periodendTime
- the end of the periodpublic void add(CumulativeTime time)
time
- the time to be addedpublic void subtract(CumulativeTime time)
time
- the time to be subtractedpublic double getHoursAsDecimalValue()
public java.lang.String getTimeViewWithoutSeconds()
public java.lang.String getTimeViewWithSeconds()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de