|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fudgemsg.types.FudgeTime
public class FudgeTime
Dummy class for holding a time value on its own at varying precisions. See DateTime encoding for more details.
Constructor Summary | |
---|---|
|
FudgeTime(Calendar time)
Creates a new FudgeTime with the time from a Calendar object. |
protected |
FudgeTime(DateTimeAccuracy accuracy,
Instant instant)
Creates a new Fudge time representation. |
|
FudgeTime(DateTimeAccuracy accuracy,
InstantProvider instantProvider)
Creates a new Fudge time representation. |
|
FudgeTime(DateTimeAccuracy accuracy,
int timezoneOffset,
int seconds,
int nanos)
Creates a new FudgeTime . |
protected |
FudgeTime(DateTimeAccuracy accuracy,
int timezoneOffset,
LocalTime localTime)
Creates a new Fudge time representation. |
protected |
FudgeTime(DateTimeAccuracy accuracy,
LocalTime localTime)
Creates a new Fudge time representation. |
|
FudgeTime(DateTimeAccuracy accuracy,
OffsetTime offsetTime)
Creates a new Fudge time representation. |
|
FudgeTime(DateTimeAccuracy accuracy,
TimeProvider timeProvider)
Creates a new Fudge time representation. |
|
FudgeTime(InstantProvider instantProvider)
Creates a new Fudge time representation. |
|
FudgeTime(OffsetTime offsetTime)
Creates a new Fudge time representation. |
|
FudgeTime(TimeProvider timeProvider)
Creates a new Fudge time representation. |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
DateTimeAccuracy |
getAccuracy()
|
int |
getHour()
Returns the hour of the day. |
int |
getMicros()
Returns the microseconds within the second. |
int |
getMillis()
Returns the milliseconds within the second. |
int |
getMinute()
Returns the minute within the hour. |
int |
getNanos()
Returns the number of nanoseconds within the second. |
protected ZoneOffset |
getOffset()
Returns the timezone offset as a ZoneOffset object. |
int |
getSeconds()
Returns the second within the minute. |
int |
getSecondsSinceMidnight()
Returns the number of seconds since midnight. |
int |
getTimezoneOffset()
Returns the timezone offset as held. |
int |
hashCode()
|
boolean |
hasTimezoneOffset()
|
LocalTime |
toLocalTime()
Returns a LocalTime representation of the time. |
OffsetTime |
toOffsetTime()
Returns a OffsetTime representation of the time. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FudgeTime(DateTimeAccuracy accuracy, int timezoneOffset, int seconds, int nanos)
FudgeTime
.
accuracy
- resolution of the timetimezoneOffset
- timezoneOffset (15 minute intervals)seconds
- seconds since midnightnanos
- nanoseconds within the secondprotected FudgeTime(DateTimeAccuracy accuracy, int timezoneOffset, LocalTime localTime)
accuracy
- granularity of the representationtimezoneOffset
- timezone offset in 15 minute intervals from UTClocalTime
- the timeprotected FudgeTime(DateTimeAccuracy accuracy, LocalTime localTime)
accuracy
- granularity of the representationlocalTime
- the timeprotected FudgeTime(DateTimeAccuracy accuracy, Instant instant)
accuracy
- granularity of the representationinstant
- time instant - the corresponding time at UTC will be usedpublic FudgeTime(OffsetTime offsetTime)
offsetTime
- timepublic FudgeTime(DateTimeAccuracy accuracy, OffsetTime offsetTime)
accuracy
- granularity of the representationoffsetTime
- timepublic FudgeTime(InstantProvider instantProvider)
instantProvider
- provides a time instant - the corresponding time at UTC will be usedpublic FudgeTime(DateTimeAccuracy accuracy, InstantProvider instantProvider)
accuracy
- granularity of the representationinstantProvider
- provides a time instant - the corresponding time at UTC will be usedpublic FudgeTime(TimeProvider timeProvider)
timeProvider
- provides the timepublic FudgeTime(DateTimeAccuracy accuracy, TimeProvider timeProvider)
accuracy
- granularity of the representationtimeProvider
- provides the timepublic FudgeTime(Calendar time)
FudgeTime
with the time from a Calendar
object.
time
- the Calendar
to copy the time fromMethod Detail |
---|
public DateTimeAccuracy getAccuracy()
public boolean hasTimezoneOffset()
true
if the FudgeTime
has a timezone offset, false
otherwisepublic int getTimezoneOffset()
getOffset()
.
public LocalTime toLocalTime()
LocalTime
representation of the time.
toLocalTime
in interface TimeProvider
protected ZoneOffset getOffset()
ZoneOffset
object. See also getTimezoneOffset()
.
public OffsetTime toOffsetTime()
OffsetTime
representation of the time.
public int getSecondsSinceMidnight()
public int getNanos()
public int getHour()
public int getMinute()
public int getSeconds()
public int getMillis()
public int getMicros()
public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |