copyWith method
Creates a copy with updated values
Implementation
NeighborAdvertisement<T> copyWith({
T? neighbor,
Map<T, num>? distanceVector,
DateTime? timestamp,
int? sequenceNumber,
Map<String, dynamic>? metadata,
}) {
return NeighborAdvertisement<T>(
neighbor: neighbor ?? this.neighbor,
distanceVector: distanceVector ?? this.distanceVector,
timestamp: timestamp ?? this.timestamp,
sequenceNumber: sequenceNumber ?? this.sequenceNumber,
metadata: metadata ?? this.metadata,
);
}