fipaos.util
Class UTCDuration
fipaos.util.UTCContainer
|
+--fipaos.util.UTCDuration
- public class UTCDuration
- extends UTCContainer
Extends UTCContainer - contains a duration specified in relative UTC
format (e.g. 1 hour = "+00000000T010000000")
Constructor Summary |
UTCDuration(String duration) Constructs a UTCDuration based upon a string based upon the format
+YYYYMMDDTHHmmSSuuu, where Y = year, M = month, D = date, H = hour
m = minute, S = seconds and u = milliseconds |
UTCDuration(int year, int month, int date, int hour, int minute, int second, int millisecond) Constructs a UTCDuration based upon the values given |
Method Summary |
void | addDuration(String duration) |
void | addDuration(int year, int month, int date, int hour, int minute, int second, int millis) |
long | getDurationInMillis() Returns the number of milliseconds this duration represents - doesn't
use the month or year field since months and years can be a variable
length |
static void | main(String[] args) |
String | toString() Overrides UTCContainer.toString() |
void | validate() Method to normalise the contents of the UTCDuration object |
UTCDuration
public UTCDuration(String duration)
- Constructs a UTCDuration based upon a string based upon the format
+YYYYMMDDTHHmmSSuuu, where Y = year, M = month, D = date, H = hour
m = minute, S = seconds and u = milliseconds
- Parameters:
- duration - Duration specified in relative UTC format
UTCDuration
public UTCDuration(int year, int month, int date, int hour, int minute, int second, int millisecond)
- Constructs a UTCDuration based upon the values given
addDuration
public void addDuration(String duration)
addDuration
public void addDuration(int year, int month, int date, int hour, int minute, int second, int millis)
getDurationInMillis
public long getDurationInMillis()
- Returns the number of milliseconds this duration represents - doesn't
use the month or year field since months and years can be a variable
length
- result The duration in millis
main
public static void main(String[] args)
toString
public String toString()
- Overrides UTCContainer.toString()
- Returns: String representation of this UTCDuration
validate
public void validate()
- Method to normalise the contents of the UTCDuration object