Package javax.time.calendar
Class LocalTime.Overflow
- java.lang.Object
-
- javax.time.calendar.LocalTime.Overflow
-
- Enclosing class:
- LocalTime
public static final class LocalTime.Overflow extends java.lang.ObjectThe result of addition to aLocalTimeallowing the expression of any overflow in days.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Compares this object to another.longgetOverflowDays()Gets the days overflowing from the calculation.LocalTimegetResultTime()Gets the time that was the result of the calculation.inthashCode()Returns a suitable hash code.LocalDateTimetoLocalDateTime(LocalDate date)Creates aLocalDateTimefrom the specified date and this instance.java.lang.StringtoString()Returns a string description of this instance.
-
-
-
Field Detail
-
time
private final LocalTime time
The time after the addition.
-
days
private final long days
The overflow in days.
-
-
Constructor Detail
-
Overflow
private Overflow(LocalTime time, long days)
Constructor.- Parameters:
time- theLocalTimeafter the addition, not nulldays- the overflow in days
-
-
Method Detail
-
getResultTime
public LocalTime getResultTime()
Gets the time that was the result of the calculation.- Returns:
- the time, never null
-
getOverflowDays
public long getOverflowDays()
Gets the days overflowing from the calculation.- Returns:
- the overflow days
-
toLocalDateTime
public LocalDateTime toLocalDateTime(LocalDate date)
Creates aLocalDateTimefrom the specified date and this instance.- Parameters:
date- the date to use, not null- Returns:
- the combination of the date, time and overflow in days, never null
-
equals
public boolean equals(java.lang.Object obj)
Compares this object to another.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the object to compare to- Returns:
- true if equal
-
hashCode
public int hashCode()
Returns a suitable hash code.- Overrides:
hashCodein classjava.lang.Object- Returns:
- the hash code
-
toString
public java.lang.String toString()
Returns a string description of this instance.- Overrides:
toStringin classjava.lang.Object- Returns:
- the string, never null
-
-