copy method

  1. @override
UndirectedEdge copy()
override

Returns a copy of the instance of your object

Implementation

@override
UndirectedEdge copy() => UndirectedEdge(a, b, weight);