EasyComparable<T> class abstract

An easy way to implement Comparable in a way that compareTo aggrees with > and == operators

Implemented types
Implementers
Available extensions
Annotations
  • @immutable

Constructors

EasyComparable()

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

compareTo(T other) int
Compares this object to another object.
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
< operator to compare this and other. Overriding it is optional, it has a default implementation that uses == and > operators
operator ==(Object other) bool
The equality operator.
override
operator >(Object other) bool
> operator to compare this and other. If this is overridden, the < operator uses it to compute its value, but can also be overridden