RoutingTable<T> class

Represents a complete routing table for a node

Constructors

RoutingTable({required T sourceNode, required Map<T, RouteEntry<T>> routes, required DateTime lastUpdate})
const

Properties

allRoutes List<RouteEntry<T>>
Gets all routes as a list
no setter
directlyConnectedRoutes List<RouteEntry<T>>
Gets directly connected routes
no setter
hashCode int
The hash code for this object.
no setterinherited
lastUpdate DateTime
final
routeCount int
Gets the number of routes
no setter
routes Map<T, RouteEntry<T>>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sourceNode → T
final

Methods

getRoute(T destination) RouteEntry<T>?
Gets the route to a specific destination
getRoutesByCost(int maxCost) List<RouteEntry<T>>
Gets routes with cost less than or equal to maxCost
getStaleRoutes(Duration threshold) List<RouteEntry<T>>
Gets routes that need updating (older than threshold)
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.
inherited