|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fipaos.util.UTCContainer
Simple container for UTC time data
Field Summary | |
protected int[] |
_date_data
Array to contain the date/time information |
protected boolean |
_use_millis
Boolean to denote if milliseconds should be used |
protected boolean |
_use_seconds
Boolean to denote if seconds should be used |
static int |
DATE
Constant to represent the date |
static int |
HOUR
Constant to represent the hour of day (24 hour format) |
static int |
MILLISECOND
Constant to represent the millisecond of the second |
static int |
MINUTE
Constant to represent the minute of the hour |
static int |
MONTH
Constant to represent the month |
static int |
SECOND
Constant to represent the second of the minute |
static int |
YEAR
Constant to represent the year |
Constructor Summary | |
protected |
UTCContainer()
Constructs a "blank" UTCContainer |
|
UTCContainer(int year,
int month,
int date,
int hour,
int minute,
int second,
int millis)
Constructs a UTCContainer object from the given parameters |
Method Summary | |
java.lang.Object |
clone()
|
boolean |
equals(UTCContainer otherTime)
Method to provide a mechanism for determining if two times are the same |
int |
get(int field)
Method to allow retreival of individual fields from the time/date |
boolean |
isAfter(UTCContainer time)
Method to provide a way of determining if a UTCContainer object represents a time before the time this UTCContainer instance represents. |
boolean |
isBefore(UTCContainer otherTime)
Method to provide a way of determining if a UTCContainer object represents a time after the time this UTCContainer instance represents |
void |
set(int field,
int value)
Method to allow manual setting of date/time fields |
void |
setAccuracy(int accuracy)
Method to change accuracy of UTCTime object. |
java.lang.String |
toString()
Overrides default Object.toString() |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int YEAR
public static final int MONTH
public static final int DATE
public static final int HOUR
public static final int MINUTE
public static final int SECOND
public static final int MILLISECOND
protected int[] _date_data
protected boolean _use_seconds
protected boolean _use_millis
Constructor Detail |
public UTCContainer(int year, int month, int date, int hour, int minute, int second, int millis)
year
- The yearmonth
- The month (1 to 12)date
- The day of the month (1 to (28 thru 31))hour
- The hour of the day (0 to 23)minute
- The minute of the hour (0 to 59)second
- The second of the minute (0 to 59, or -1 for minute precision)millis
- The millisecond of the second (0 to 999, or -1 for second precision)protected UTCContainer()
Method Detail |
public int get(int field)
field
- The field which is to be retreivedpublic void set(int field, int value)
field
- The field which is to be changedvalue
- The new value to set the field topublic boolean isBefore(UTCContainer otherTime)
time
- A UTCContainer object to comparepublic boolean isAfter(UTCContainer time)
time
- A UTCContainer object to comparepublic boolean equals(UTCContainer otherTime)
time
- The time to comparepublic java.lang.String toString()
toString
in class java.lang.Object
public void setAccuracy(int accuracy)
accuracy
- One of the above constantspublic java.lang.Object clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |