|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectezvcard.util.UtcOffset
public final class UtcOffset
Represents a UTC offset.
Constructor Summary | |
---|---|
UtcOffset(int hour,
int minute)
Creates a new UTC offset. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
int |
getHour()
Gets the hour component. |
int |
getMinute()
Gets the minute component. |
int |
hashCode()
|
static UtcOffset |
parse(String text)
Parses a UTC offset from a string. |
static UtcOffset |
parse(TimeZone timezone)
Creates a UTC offset from a TimeZone object. |
String |
toString()
Converts this offset to its ISO string representation using "basic" format. |
String |
toString(boolean extended)
Converts this offset to its ISO string representation. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UtcOffset(int hour, int minute)
hour
- the hour component (may be negative)minute
- the minute component (must be between 0 and 59)Method Detail |
---|
public static UtcOffset parse(String text)
text
- the text to parse (e.g. "-0500")
IllegalArgumentException
- if the text cannot be parsedpublic static UtcOffset parse(TimeZone timezone)
TimeZone
object.
timezone
- the timezone
public int getHour()
public int getMinute()
public String toString()
toString
in class Object
public String toString(boolean extended)
extended
- true to use extended format (e.g. "-05:00"), false to use
basic format (e.g. "-0500")
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |