DateTimeZoneCache class
Provides an implementation of DateTimeZoneProvider that caches results from an DateTimeZoneSource.
The process of loading or creating time zones may be an expensive operation. This class implements an
unlimited-size non-expiring cache over a time zone source, and adapts an implementation of the
IDateTimeZoneSource
interface to an IDateTimeZoneProvider
.
see also: DateTimeZoneProviders
- Inheritance
-
- Object
- DateTimeZoneProvider
- DateTimeZoneCache
- Annotations
-
- @immutable
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
ids
↔ List<
String> -
finalgetter/setter pairinherited-setteroverride-getter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- versionId ↔ String
-
Gets the version ID of this provider. This is simply the DateTimeZoneSource.versionId returned by
the underlying source.
finalgetter/setter pairinherited-setteroverride-getter
Methods
-
getAllZones(
) → Future< Iterable< DateTimeZone> > -
Returns a sequence of time zones from the specified provider,
in the same order in which the IDs are returned by the provider.
inherited
-
getCachedSystemDefault(
) → DateTimeZone -
override
-
getCachedZoneOrNull(
String id) → DateTimeZone? -
getDateTimeZoneSync(
String id) → DateTimeZone -
override
-
getSystemDefault(
) → Future< DateTimeZone> -
override
-
getZoneOrNull(
String id) → Future< DateTimeZone?> -
override
-
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
-
operator [](
String id) → Future< DateTimeZone> -
Returns the time zone for the given ID.
override
Static Methods
-
getCache(
DateTimeZoneSource source) → Future< DateTimeZoneCache> - Creates a provider backed by the given DateTimeZoneSource.