RouteNodeEquality class sealed
Strategy for comparing two RouteNode instances for equality.
Different strategies include or exclude certain fields (RouteNode.route, RouteNode.arguments, RouteNode.extra, RouteNode.children). Pick the narrowest strategy that still reflects the equality you need.
Example
const equality = RouteNodeEquality.routeAndArguments();
final same = equality.equals(nodeA, nodeB);
- Annotations
-
- @experimental
Constructors
- RouteNodeEquality.deep()
-
Compares nodes by
RouteNode.route,RouteNode.arguments,RouteNode.extraandRouteNode.children, recursively.constfactory - RouteNodeEquality.route()
-
Compares nodes by
RouteNode.routeonly.constfactory - RouteNodeEquality.routeAndArguments()
-
Compares nodes by
RouteNode.routeandRouteNode.arguments.constfactory - RouteNodeEquality.routeAndArgumentsAndExtra()
-
Compares nodes by
RouteNode.route,RouteNode.argumentsandRouteNode.extra.constfactory
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(
RouteNode e1, RouteNode e2) → bool -
Compare two elements for being equal.
inherited
-
hash(
RouteNode e) → int -
Get a hashcode of an element.
inherited
-
isValidKey(
Object? o) → bool -
Test whether an object is a valid argument to
equalsandhash.inherited -
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