Class

org.threeten.bp

ZoneRegion

Related Doc: package bp

Permalink

final class ZoneRegion extends ZoneId with Serializable

A geographical region where the same time-zone rules apply.

Time-zone information is categorized as a set of rules defining when and how the offset from UTC/Greenwich changes. These rules are accessed using identifiers based on geographical regions, such as countries or states. The most common region classification is the Time Zone Database (TZDB), which defines regions such as 'Europe/Paris' and 'Asia/Tokyo'.

The region identifier, modeled by this class, is distinct from the underlying rules, modeled by ZoneRules. The rules are defined by governments and change frequently. By contrast, the region identifier is well-defined and long-lived. This separation also allows rules to be shared between regions if appropriate.

Specification for implementors

This class is immutable and thread-safe.

Annotations
@SerialVersionUID()
Linear Supertypes
ZoneId, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ZoneRegion
  2. ZoneId
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(obj: Any): Boolean

    Permalink

    Checks if this time-zone ID is equal to another time-zone ID.

    Checks if this time-zone ID is equal to another time-zone ID.

    The comparison is based on the ID.

    obj

    the object to check, null returns false

    returns

    true if this is equal to the other time-zone ID

    Definition Classes
    ZoneId → AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def getDisplayName(style: TextStyle, locale: Locale): String

    Permalink

    Gets the textual representation of the zone, such as 'British Time' or '+02:00'.

    Gets the textual representation of the zone, such as 'British Time' or '+02:00'.

    This returns the textual name used to identify the time-zone ID, suitable for presentation to the user. The parameters control the style of the returned text and the locale.

    If no textual mapping is found then the full ID is returned.

    style

    the length of the text required, not null

    locale

    the locale to use, not null

    returns

    the text value of the zone, not null

    Definition Classes
    ZoneId
  11. def getId: String

    Permalink

    Gets the unique time-zone ID.

    Gets the unique time-zone ID.

    This ID uniquely defines this object. The format of an offset based ID is defined by ZoneOffset#getId().

    returns

    the time-zone unique ID, not null

    Definition Classes
    ZoneRegionZoneId
  12. def getRules: ZoneRules

    Permalink

    Gets the time-zone rules for this ID allowing calculations to be performed.

    Gets the time-zone rules for this ID allowing calculations to be performed.

    The rules provide the functionality associated with a time-zone, such as finding the offset for a given instant or local date-time.

    A time-zone can be invalid if it is deserialized in a Java Runtime which does not have the same rules loaded as the Java Runtime that stored it. In this case, calling this method will throw a ZoneRulesException.

    The rules are supplied by ZoneRulesProvider. An advanced provider may support dynamic updates to the rules without restarting the Java Runtime. If so, then the result of this method may change over time. Each individual call will be still remain thread-safe.

    ZoneOffset will always return a set of rules where the offset never changes.

    returns

    the rules, not null

    Definition Classes
    ZoneRegionZoneId
    Exceptions thrown

    ZoneRulesException if no rules are available for this ID

  13. def hashCode(): Int

    Permalink

    A hash code for this time-zone ID.

    A hash code for this time-zone ID.

    returns

    a suitable hash code

    Definition Classes
    ZoneId → AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. def normalized: ZoneId

    Permalink

    Normalizes the time-zone ID, returning a ZoneOffset where possible.

    Normalizes the time-zone ID, returning a ZoneOffset where possible.

    The returns a normalized ZoneId that can be used in place of this ID. The result will have ZoneRules equivalent to those returned by this object, however the ID returned by getId() may be different.

    The normalization checks if the rules of this ZoneId have a fixed offset. If they do, then the ZoneOffset equal to that offset is returned. Otherwise this is returned.

    returns

    the time-zone unique ID, not null

    Definition Classes
    ZoneId
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. def toString(): String

    Permalink

    Outputs this zone as a String, using the ID.

    Outputs this zone as a String, using the ID.

    returns

    a string representation of this time-zone ID, not null

    Definition Classes
    ZoneId → AnyRef → Any
  21. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ZoneId

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped