Java java.time OffsetTime fields, constructors, methods, implement or subclass

Example usage for Java java.time OffsetTime fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.time OffsetTime.

The text is from its open source code.

Field

OffsetTimeMIN
The minimum supported OffsetTime , '00:00:00+18:00'.
OffsetTimeMAX
The maximum supported OffsetTime , '23:59:59.999999999-18:00'.

Method

TemporaladjustInto(Temporal temporal)
Adjusts the specified temporal object to have the same offset and time as this object.
OffsetDateTimeatDate(LocalDate date)
Combines this time with a date to create an OffsetDateTime .
intcompareTo(OffsetTime other)
Compares this OffsetTime to another time.
booleanequals(Object obj)
Checks if this time is equal to another time.
Stringformat(DateTimeFormatter formatter)
Formats this time using the specified formatter.
OffsetTimefrom(TemporalAccessor temporal)
Obtains an instance of OffsetTime from a temporal object.
intget(TemporalField field)
Gets the value of the specified field from this time as an int .
intgetHour()
Gets the hour-of-day field.
longgetLong(TemporalField field)
Gets the value of the specified field from this time as a long .
intgetMinute()
Gets the minute-of-hour field.
intgetNano()
Gets the nano-of-second field.
ZoneOffsetgetOffset()
Gets the zone offset, such as '+01:00'.
intgetSecond()
Gets the second-of-minute field.
inthashCode()
A hash code for this time.
booleanisAfter(OffsetTime other)
Checks if the instant of this OffsetTime is after that of the specified time applying both times to a common date.
booleanisBefore(OffsetTime other)
Checks if the instant of this OffsetTime is before that of the specified time applying both times to a common date.
booleanisEqual(OffsetTime other)
Checks if the instant of this OffsetTime is equal to that of the specified time applying both times to a common date.
booleanisSupported(TemporalField field)
Checks if the specified field is supported.
booleanisSupported(TemporalUnit unit)
Checks if the specified unit is supported.
OffsetTimeminus(TemporalAmount amountToSubtract)
Returns a copy of this time with the specified amount subtracted.
OffsetTimeminus(long amountToSubtract, TemporalUnit unit)
Returns a copy of this time with the specified amount subtracted.
OffsetTimeminusHours(long hours)
Returns a copy of this OffsetTime with the specified number of hours subtracted.
OffsetTimeminusMinutes(long minutes)
Returns a copy of this OffsetTime with the specified number of minutes subtracted.
OffsetTimeminusNanos(long nanos)
Returns a copy of this OffsetTime with the specified number of nanoseconds subtracted.
OffsetTimeminusSeconds(long seconds)
Returns a copy of this OffsetTime with the specified number of seconds subtracted.
OffsetTimenow()
Obtains the current time from the system clock in the default time-zone.
OffsetTimenow(ZoneId zone)
Obtains the current time from the system clock in the specified time-zone.
OffsetTimenow(Clock clock)
Obtains the current time from the specified clock.
OffsetTimeof(int hour, int minute, int second, int nanoOfSecond, ZoneOffset offset)
Obtains an instance of OffsetTime from an hour, minute, second and nanosecond.
OffsetTimeof(LocalTime time, ZoneOffset offset)
Obtains an instance of OffsetTime from a local time and an offset.
OffsetTimeofInstant(Instant instant, ZoneId zone)
Obtains an instance of OffsetTime from an Instant and zone ID.
OffsetTimeparse(CharSequence text)
Obtains an instance of OffsetTime from a text string such as 10:15:30+01:00 .
OffsetTimeparse(CharSequence text, DateTimeFormatter formatter)
Obtains an instance of OffsetTime from a text string using a specific formatter.
OffsetTimeplus(long amountToAdd, TemporalUnit unit)
Returns a copy of this time with the specified amount added.
OffsetTimeplus(TemporalAmount amountToAdd)
Returns a copy of this time with the specified amount added.
OffsetTimeplusHours(long hours)
Returns a copy of this OffsetTime with the specified number of hours added.
OffsetTimeplusMinutes(long minutes)
Returns a copy of this OffsetTime with the specified number of minutes added.
OffsetTimeplusNanos(long nanos)
Returns a copy of this OffsetTime with the specified number of nanoseconds added.
OffsetTimeplusSeconds(long seconds)
Returns a copy of this OffsetTime with the specified number of seconds added.
Rquery(TemporalQuery query)
Queries this time using the specified query.
ValueRangerange(TemporalField field)
Gets the range of valid values for the specified field.
LocalTimetoLocalTime()
Gets the LocalTime part of this date-time.
StringtoString()
Outputs this time as a String , such as 10:15:30+01:00 .
OffsetTimetruncatedTo(TemporalUnit unit)
Returns a copy of this OffsetTime with the time truncated.
longuntil(Temporal endExclusive, TemporalUnit unit)
Calculates the amount of time until another time in terms of the specified unit.
OffsetTimewith(TemporalAdjuster adjuster)
Returns an adjusted copy of this time.
OffsetTimewith(LocalTime time, ZoneOffset offset)
Returns a new time based on this one, returning this where possible.
OffsetTimewith(TemporalField field, long newValue)
Returns a copy of this time with the specified field set to a new value.
OffsetTimewithHour(int hour)
Returns a copy of this OffsetTime with the hour-of-day altered.
OffsetTimewithMinute(int minute)
Returns a copy of this OffsetTime with the minute-of-hour altered.
OffsetTimewithNano(int nanoOfSecond)
Returns a copy of this OffsetTime with the nano-of-second altered.
OffsetTimewithOffsetSameInstant(ZoneOffset offset)
Returns a copy of this OffsetTime with the specified offset ensuring that the result is at the same instant on an implied day.
OffsetTimewithOffsetSameLocal(ZoneOffset offset)
Returns a copy of this OffsetTime with the specified offset ensuring that the result has the same local time.
OffsetTimewithSecond(int second)
Returns a copy of this OffsetTime with the second-of-minute altered.