DateTimeZoneSource class abstract

Provides the interface for objects that can retrieve time zone definitions given an ID.

The interface presumes that the available time zones are static; there is no mechanism for updating the list of available time zones. Any time zone ID that is returned in getIds must be resolved by forId for the life of the source.

Implementations need not cache time zones or the available time zone IDs. Caching is typically provided by DateTimeZoneCache, which most consumers should use instead of consuming DateTimeZoneSource directly in order to get better performance.

It is expected that any exceptions thrown are implementation-specific; nothing is explicitly specified in the interface. Typically this would be unusual to the point that callers would not try to catch them; any implementation which may break in ways that are sensible to catch should advertise this clearly, so that clients will know to handle the exceptions appropriately. No wrapper exception type is provided by Time Machine to handle this situation, and code in Time Machine does not try to catch such exceptions.

Implementers
Annotations
  • @interface

Constructors

DateTimeZoneSource()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
systemDefaultId String?
Returns this source's ID for the system default time zone.
no setter
versionId Future<String>?
Returns an appropriate version ID for diagnostic purposes, which must not be null.
final

Methods

forCachedId(String id) DateTimeZone?
forId(String id) Future<DateTimeZone>?
Returns the time zone definition associated with the given ID.
getIds() Future<Iterable<String>>?
Returns an unordered enumeration of the IDs available from this source.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited