|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mulgara.util.Timezone
public class Timezone
Maps from a known hour:minute offset for a timezone into a 6 bit code, and back. created Jun 5, 2008
| Field Summary | |
|---|---|
static byte |
ZULU_CODE
A special code for ZULU, to distinguish it from 00:00. |
| Constructor Summary | |
|---|---|
Timezone(byte code)
Constructs a Timezone using a code. |
|
Timezone(int hour,
int minute)
Constructs a Timezone using an hour:minute offset. |
|
| Method Summary | |
|---|---|
TimeZone |
asJavaTimeZone()
Convert to a TimeZone |
byte |
getCode()
Gets the code for this timezone. |
int |
getHour()
Gets the hour for this timezone. |
int |
getMinute()
Gets the minute for this timezone. |
static byte |
getZuluCode()
Gets the code for the ZULU timezone. |
boolean |
isZulu()
Indicates if this code represents Zulu. |
static Timezone |
newZuluTimezone()
A convenience factory method to construct a ZULU timezone. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final byte ZULU_CODE
| Constructor Detail |
|---|
public Timezone(byte code)
code - The code for a known timezone.
IllegalArgumentException - The code does not correspond to a timezone in the database.
public Timezone(int hour,
int minute)
hour - The hour offset of the timezone. This cannot encode ZULU time.minute - The minute offset of the timezone.
IllegalArgumentException - The timezone is not in the database of known timezones.| Method Detail |
|---|
public static Timezone newZuluTimezone()
public int getHour()
public int getMinute()
public byte getCode()
public boolean isZulu()
public String toString()
toString in class ObjectObject.toString()public TimeZone asJavaTimeZone()
public static byte getZuluCode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||