copyWith method
LinkStateAdvertisement<T>
copyWith({
- T? routerId,
- T? networkId,
- num? linkCost,
- LinkStateType? linkType,
- DateTime? timestamp,
- int? sequenceNumber,
- int? age,
Creates a copy with updated values
Implementation
LinkStateAdvertisement<T> copyWith({
T? routerId,
T? networkId,
num? linkCost,
LinkStateType? linkType,
DateTime? timestamp,
int? sequenceNumber,
int? age,
}) {
return LinkStateAdvertisement<T>(
routerId: routerId ?? this.routerId,
networkId: networkId ?? this.networkId,
linkCost: linkCost ?? this.linkCost,
linkType: linkType ?? this.linkType,
timestamp: timestamp ?? this.timestamp,
sequenceNumber: sequenceNumber ?? this.sequenceNumber,
age: age ?? this.age,
);
}