ZoneEqualityComparer class
Equality comparer for time zones, comparing specific aspects of the zone intervals within a time zone for a specific interval of the time line.
The default behaviour of this comparator is to consider two time zones to be equal if they share the same wall offsets at all points within a given time interval, regardless of other aspects of each ZoneInterval within the two time zones. This behaviour can be changed using the withOptions method.
- Annotations
-
- @immutable
Constructors
- ZoneEqualityComparer.forInterval(Interval interval)
-
Returns a ZoneEqualityComparer for the given interval with the default options.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
equals(
DateTimeZone x, DateTimeZone y) → bool - Compares two time zones for equality according to the options and interval provided to this comparer.
-
getHashCode(
DateTimeZone obj) → int - Returns a hash code for the specified time zone.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
withOptions(
ZoneEqualityComparerOptions options) → ZoneEqualityComparer - Returns a comparer operating over the same interval as this one, but with the given set of options.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited