| 序号 |
方法 & 描述 |
| 1 |
Temporal adjustInto(Temporal temporal)
将指定的时间对象调整为与该对象具有相同的日期和时间。 |
| 2 |
LocalDateTime atDate(LocalDate date)
将此时间与日期相结合以创建 LocalDateTime。 |
| 3 |
OffsetDateTime atOffset(ZoneOffset offset)
将此时间与偏移时间相结合以创建 OffsetDateTime。 |
| 4 |
int compareTo(LocalTime other)
将这次与另一次进行比较。 |
| 5 |
boolean equals(Object obj)
检查这个时间是否等于另一个时间。 |
| 6 |
String format(DateTimeFormatter formatter)
这次使用指定的格式化程序进行格式化。 |
| 7 |
static LocalTime from(TemporalAccessor temporal)
从时间对象中获取 LocalTime 的实例。 |
| 8 |
int get(TemporalField field)
从此时获取指定字段的值作为 int。 |
| 9 |
int getHour()
获取小时字段。 |
| 10 |
long getLong(TemporalField field)
从本次获取指定字段的值作为long。 |
| 11 |
int getMinute()
获取分钟字段。 |
| 12 |
int getNano()
获取纳秒字段。 |
| 13 |
int getSecond()
获取秒字段。 |
| 14 |
int hashCode()
这次的哈希码。 |
| 15 |
boolean isAfter(LocalTime other)
检查此时间是否在指定时间之后。 |
| 16 |
boolean isBefore(LocalTime other)
检查此时间是否早于指定时间。 |
| 17 |
boolean isSupported(TemporalField field)
检查是否支持指定的字段。 |
| 18 |
boolean isSupported(TemporalUnit unit)
检查是否支持指定的单位。 |
| 19 |
LocalTime minus(long amountToSubtract, TemporalUnit unit)
返回此时间的副本,减去指定的数量。 |
| 20 |
本地时间减(TemporalAmount amountToSubtract)
返回减去指定数量的该时间的副本。 |
| 21 |
LocalTime minusHours(long hoursToSubtract)
返回此 LocalTime 的副本,减去指定的小时数。 |
| 22 |
LocalTime minusMinutes(long minutesToSubtract)
返回此 LocalTime 的副本,减去指定的分钟数。 |
| 23 |
LocalTime minusNanos(long nanos)
返回此 LocalTime 的副本,减去指定的纳秒数。 |
| 24 |
LocalTime minusSeconds(long seconds)
返回此 LocalTime 的副本,减去指定的秒数。 |
| 25 |
static LocalTime now()
从默认时区的系统时钟获取当前时间。 |
| 26 |
static LocalTime now(Clock clock)
从指定时钟获取当前时间。 |
| 27 |
static LocalTime now(ZoneId zone)
从指定时区的系统时钟获取当前时间。 |
| 28 |
static LocalTime of(int hour, int minute)
从一小时和一分钟获取 LocalTime 的实例。 |
| 29 |
static LocalTime of(int hour, int minute, int second)
从小时、分钟和秒中获取 LocalTime 的实例。 |
| 30 |
static LocalTime of(int hour, int minute, int second, int nanoOfSecond)
从小时、分钟、秒和纳秒中获取 LocalTime 的实例。 |
| 31 |
static LocalTime ofNanoOfDay(long nanoOfDay)
从纳日值中获取 LocalTime 的实例。 |
| 32 |
static LocalTime ofSecondOfDay(long secondOfDay)
从第二天的值中获取 LocalTime 的实例。 |
| 33 |
static LocalTime parse(CharSequence text)
从 2007-12-03T10:15:30 等文本字符串中获取 LocalTime 的实例。 |
| 34 |
static LocalTime parse(CharSequence text, DateTimeFormatter formatter)
使用特定格式化程序从文本字符串中获取 LocalTime 的实例。 |
| 35 |
LocalTime plus(long amountToAdd, TemporalUnit unit)
返回此时间的副本,并添加指定的数量。 |
| 36 |
LocalTime plus(TemporalAmount amountToAdd)
返回此时间的副本,其中添加了指定的数量。 |
| 37 |
LocalTime plusHours(long hoursToAdd)
返回此 LocalTime 的副本,并添加指定的小时数。 |
| 38 |
LocalTime plusMinutes(long minutesToAdd)
返回此 LocalTime 的副本,并添加指定的分钟数。 |
| 39 |
LocalTime plusNanos(long nanos)
返回此 LocalTime 的副本,并添加指定的纳秒数。 |
| 40 |
LocalTime plusSeconds(long seconds)
返回此 LocalTime 的副本,并添加指定的秒数。 |
| 41 |
<R> R query(TemporalQuery<R> query)
这次使用指定的查询进行查询。 |
| 42 |
ValueRange range(TemporalField field)
获取指定字段的有效值范围。 |
| 43 |
long toNanoOfDay()
将时间提取为一天的纳秒,从 0 到 24 * 60 * 60 * 1,000,000,000 - 1。 |
| 44 |
int toSecondOfDay()
将时间提取为一天中的秒数,从 0 到 24 * 60 * 60 - 1。 |
| 45 |
String toString()
将此日期输出为字符串,例如 10:15。 |
| 46 |
LocalTime truncatedTo(TemporalUnit unit)
返回此 LocalTime 的副本,其中时间被截断。 |
| 47 |
long until(Temporal endExclusive, TemporalUnit unit)
根据指定的单位计算直到另一个时间的时间量。 |
| 48 |
LocalTime with(TemporalAdjuster adjuster)
返回本次调整后的副本。 |
| 49 |
LocalTime with(TemporalField field, long newValue)
返回此时间的副本,并将指定字段设置为新值。 |
| 50 |
LocalTime withHour(int hour)
返回此 LocalTime 的副本,其中更改了一天中的时间。 |
| 51 |
LocalTime withMinute(int minute)
返回此 LocalTime 的副本,其中分钟已更改。 |
| 52 |
LocalTime withNano(int nanoOfSecond)
返回此 LocalTime 的副本,更改了纳秒。 |
| 53 |
LocalTime withSecond(int second)
返回此 LocalTime 的副本,其中秒数已更改。 |