copyWith method
Creates a copy with updated values
Implementation
RouteEntry<T> copyWith({
T? destination,
T? nextHop,
int? cost,
DateTime? lastUpdate,
bool? isDirectlyConnected,
}) {
return RouteEntry<T>(
destination: destination ?? this.destination,
nextHop: nextHop ?? this.nextHop,
cost: cost ?? this.cost,
lastUpdate: lastUpdate ?? this.lastUpdate,
isDirectlyConnected: isDirectlyConnected ?? this.isDirectlyConnected,
);
}