📅  最后修改于: 2020-11-14 10:49:17             🧑  作者: Mango
java.time.ZoneId类表示时区ID,例如Europe / Paris。
以下是java.time.ZoneId类的声明-
public abstract class ZoneId
extends Object
implements Serializable
以下是Java.time.ZoneId类的字段-
静态Map
Sr.No. | Method & Description |
---|---|
1 | boolean equals(Object obj)
Checks if this time-zone ID is equal to another time-zone ID. |
2 | static ZoneId from(TemporalAccessor temporal)
Obtains an instance of ZoneId from a temporal object. |
3 | static Set Gets the set of available zone IDs. |
4 | String getDisplayName(TextStyle style, Locale locale)
Gets the textual representation of the zone, such as ‘British Time’ or ‘+02:00’. |
5 | abstract String getId()
Gets the unique time-zone ID. |
6 | abstract ZoneRules getRules()
Gets the time-zone rules for this ID allowing calculations to be performed. |
7 | int hashCode()
A hash code for this time-zone ID. |
8 | ZoneId normalized()
Normalizes the time-zone ID, returning a ZoneOffset where possible. |
9 | static ZoneId of(String zoneId)
Obtains an instance of ZoneId from an ID ensuring that the ID is valid and available for use. |
10 | static ZoneId of(String zoneId, Map Obtains an instance of ZoneId using its ID using a map of aliases to supplement the standard zone IDs. |
11 | static ZoneId ofOffset(String prefix, ZoneOffset offset)
Obtains an instance of ZoneId wrapping an offset. |
12 | static ZoneId systemDefault()
Gets the system default time-zone. |
13 | String toString()
Outputs this zone as a String, using the ID. |
此类从以下类继承方法-