NeighborAdvertisement<T> class

Represents a neighbor advertisement with routing information

Constructors

NeighborAdvertisement({required T neighbor, required Map<T, num> distanceVector, required DateTime timestamp, required int sequenceNumber, Map<String, dynamic> metadata = const {}})
const

Properties

distanceVector Map<T, num>
final
hashCode int
The hash code for this object.
no setteroverride
isRecent bool
Checks if the advertisement is recent enough
no setter
metadata Map<String, dynamic>
final
neighbor → T
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sequenceNumber int
final
timestamp DateTime
final

Methods

copyWith({T? neighbor, Map<T, num>? distanceVector, DateTime? timestamp, int? sequenceNumber, Map<String, dynamic>? metadata}) NeighborAdvertisement<T>
Creates a copy with updated values
getCostTo(T destination) num?
Gets the cost to a specific destination
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override