ObjectComparator class

Helper class to perform comparison operations over arbitrary values.

Example

ObjectComparator.compare(2, 'GT', 1);        // Result: true
ObjectComparator.areEqual('A', 'B');         // Result: false

Constructors

ObjectComparator()

Properties

hashCode → int
The hash code for this object. [...]
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator. [...]
inherited

Static Methods

areEqual(dynamic value1 dynamic value2) → bool
Checks if two values are equal. The operation can be performed over values of any type. [...]
areNotEqual(dynamic value1 dynamic value2) → bool
Checks if two values are NOT equal The operation can be performed over values of any type. [...]
compare(dynamic value1 String operation, dynamic value2) → bool
Perform comparison operation over two arguments. The operation can be performed over values of any type. [...]
isGreater(dynamic value1 dynamic value2) → bool
Checks if first value is greater than the second one. The operation can be performed over numbers or strings. [...]
isLess(dynamic value1 dynamic value2) → bool
Checks if first value is less than the second one. The operation can be performed over numbers or strings. [...]
match(dynamic value dynamic regexp) → bool
Checks if string matches a regular expression [...]