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
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
-
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
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