public class MultiTime extends java.lang.Object implements java.lang.Comparable<MultiTime>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ABBRDFS
1989/01/19 11:45:30.234
|
static java.lang.String |
AMER
jan 19, 1983 11:45:30.234
|
static java.lang.String |
AMERDATE
1/19/83 11:45:30.234
|
static java.lang.String |
BINARY
758979930.234
|
static java.lang.String |
CLUSTER
19-01-1989 11:45:30.234
|
static java.lang.String |
DFS
1989-JAN-19 11:45:30.234
|
static java.lang.String |
DOY
1983 303 11:45:30.234
|
static java.lang.String |
EURO
19 jan 1983 11:45:30.234
|
static java.lang.String |
EURODATE
19.1.83 11:45:30.234
|
static java.lang.String |
HIGHLOW
83 01 19 00 11 45 30.234
|
static java.lang.String |
ISEEDATE
83 019 JAN 19 11 45 30.234
|
static java.lang.String |
ISO
19890119T114530.234
|
static java.lang.String |
JAPANDATE
83.1.19 11:45:30.234
|
java.util.Calendar |
mDate
The Date variable where parsed values are stored.
|
java.util.TimeZone |
mTimeZone |
static java.lang.String |
NIPPONDATE
83.19.1 11:45:30.234
|
static java.lang.String |
PDS
1989-01-19T11:45:30.234 or 1989-019T11:45:30.234 with omissions
|
Constructor and Description |
---|
MultiTime()
Creates an instance of a time value.
|
MultiTime(MultiTime item)
Creates an instance of a time value.
|
Modifier and Type | Method and Description |
---|---|
void |
advance(double minutes)
Advances the time by a specified number of minutes.
|
int |
compareTo(MultiTime anotherTime)
Compare a time to this instance for ordering.
|
boolean |
convert(java.lang.String pattern,
java.lang.String buffer)
Parses a string into a Date using the given pattern.
|
void |
copy(MultiTime item)
Makes a copy of a MultiTime item.
|
void |
dawn()
Sets the time to the earliest possible time.
|
void |
eternity()
Sets the time to the latest possible time.
|
static java.lang.String |
findSpec(java.lang.String name)
Returns the time format specification that matches the given
standard format name.
|
java.lang.String |
format(java.lang.String pattern)
Formats the time in the requested format and returns the string.
|
static void |
main(java.lang.String[] args)
Execute the class from the command line
|
void |
now()
Sets the date to the current system time.
|
long |
span(MultiTime other)
Returns the number of milliseconds between a time and this time.
|
public static final java.lang.String AMERDATE
public static final java.lang.String EURODATE
public static final java.lang.String AMER
public static final java.lang.String EURO
public static final java.lang.String DOY
public static final java.lang.String JAPANDATE
public static final java.lang.String NIPPONDATE
public static final java.lang.String HIGHLOW
public static final java.lang.String ISEEDATE
public static final java.lang.String DFS
public static final java.lang.String ABBRDFS
public static final java.lang.String PDS
public static final java.lang.String ISO
public static final java.lang.String BINARY
public static final java.lang.String CLUSTER
public java.util.TimeZone mTimeZone
public java.util.Calendar mDate
public MultiTime()
public MultiTime(MultiTime item)
item
- the instance of a MultiTime value
to initialize this instance with.public static void main(java.lang.String[] args)
public boolean convert(java.lang.String pattern, java.lang.String buffer)
pattern
- the text containing the pattern to parse
buffer with.buffer
- the text containing the string to parse.true
if the string could be parsed.
false
if any error occured.public java.lang.String format(java.lang.String pattern)
pattern
- the text containing the pattern to format
the time as.public static java.lang.String findSpec(java.lang.String name)
name
- the name of the standard format.public void dawn()
public void eternity()
public int compareTo(MultiTime anotherTime)
compareTo
in interface java.lang.Comparable<MultiTime>
anotherTime
- the MultiTime to compare to this time.public void copy(MultiTime item)
item
- the instance of the MultiTime item to copy.public void advance(double minutes)
minutes
- the number of minutes to advance the time by.
The value may include a fractional minute.public void now()
public long span(MultiTime other)
other
- the instance of the MultiTime item to compare to.Copyright © 2008-2018 Regents University of California. All Rights Reserved.