public final class LocalTime extends Object implements Comparable<LocalTime>, TemporalAccessor
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(LocalTime other) |
boolean |
equals(Object obj) |
String |
format(DateTimeFormatter formatter) |
int |
getHour() |
int |
getMinute() |
int |
getNano() |
int |
getSecond() |
int |
hashCode() |
static LocalTime |
now() |
static LocalTime |
now(Clock clock) |
static LocalTime |
of(int hour,
int minute) |
static LocalTime |
of(int hour,
int minute,
int second) |
static LocalTime |
of(int hour,
int minute,
int second,
int nano) |
static LocalTime |
ofNanoOfDay(long nanoOfDay) |
static LocalTime |
ofSecondOfDay(long secondOfDay) |
static LocalTime |
parse(CharSequence text) |
static LocalTime |
parse(CharSequence text,
DateTimeFormatter formatter) |
LocalTime |
plusHours(long hoursToAdd) |
LocalTime |
plusMinutes(long minutesToAdd) |
LocalTime |
plusSeconds(long secondsToAdd) |
long |
toNanoOfDay() |
int |
toSecondOfDay() |
String |
toString() |
public static final LocalTime MIDNIGHT
public static LocalTime now()
public static LocalTime of(int hour, int minute)
public static LocalTime of(int hour, int minute, int second)
public static LocalTime of(int hour, int minute, int second, int nano)
public static LocalTime ofSecondOfDay(long secondOfDay)
public static LocalTime ofNanoOfDay(long nanoOfDay)
public static LocalTime parse(CharSequence text)
public static LocalTime parse(CharSequence text, DateTimeFormatter formatter)
public int getHour()
public int getMinute()
public int getSecond()
public int getNano()
public int toSecondOfDay()
public long toNanoOfDay()
public LocalTime plusHours(long hoursToAdd)
public LocalTime plusMinutes(long minutesToAdd)
public LocalTime plusSeconds(long secondsToAdd)
public String format(DateTimeFormatter formatter)
public int compareTo(LocalTime other)
compareTo in interface Comparable<LocalTime>Copyright © 2026. All rights reserved.