Record Class RouterNode
java.lang.Object
java.lang.Record
dev.relism.flash.ext.routeviewer.model.RouterNode
- Record Components:
namespace- the router's namespace prefix (e.g."/","/api")routerType- simple class name of the router implementation (e.g."FastPathRouterImpl")routes- routes registered directly on this router, in registration order
public record RouterNode(String namespace, String routerType, List<RouteRecord> routes)
extends Record
A node in the route graph representing a single router instance.
Routers are identified by their namespace prefix. The hierarchy
(parent/child relationships) is inferred by prefix matching — a router
with namespace "/api/users" is a child of "/api".
-
Constructor Summary
ConstructorsConstructorDescriptionRouterNode(String namespace, String routerType, List<RouteRecord> routes) Creates an instance of aRouterNoderecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisChildOf(RouterNode other) Returnstrueifotheris a direct or indirect parent of this node.Returns the value of thenamespacerecord component.Returns the value of therouterTyperecord component.routes()Returns the value of theroutesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RouterNode
Creates an instance of aRouterNoderecord class.- Parameters:
namespace- the value for thenamespacerecord componentrouterType- the value for therouterTyperecord componentroutes- the value for theroutesrecord component
-
-
Method Details
-
isChildOf
Returnstrueifotheris a direct or indirect parent of this node. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
namespace
Returns the value of thenamespacerecord component.- Returns:
- the value of the
namespacerecord component
-
routerType
Returns the value of therouterTyperecord component.- Returns:
- the value of the
routerTyperecord component
-
routes
Returns the value of theroutesrecord component.- Returns:
- the value of the
routesrecord component
-