Package com.vaadin.flow.router
Record Class RouteReference
java.lang.Object
java.lang.Record
com.vaadin.flow.router.RouteReference
- Record Components:
- the navigation target classrouteParameters- the route parameters to resolve the navigation target with
- All Implemented Interfaces:
Serializable
public record RouteReference(Class<? extends Component> navigationTarget, RouteParameters routeParameters)
extends Record
implements Serializable
A reference to a route, consisting of the navigation target class and the
RouteParameters it should be resolved with. It identifies a route
regardless of whether the route has a logical parent.
It is returned by a RouteParentResolver to describe a logical parent
and is the element type of a resolved breadcrumb trail. The parameters are
part of the reference because a parent route typically inherits only a subset
of the child parameters (for example orgs/:orgId as the parent of
orgs/:orgId/projects/:projectId), and that subset is needed both to
resolve the parent's own title and to resolve its parent in turn.
- Since:
- 25.2
- Author:
- Vaadin Ltd
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRouteReference(Class<? extends Component> navigationTarget, RouteParameters routeParameters) Creates an instance of aRouteReferencerecord 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.Returns the value of thenavigationTargetrecord component.Returns the value of therouteParametersrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RouteReference
Creates an instance of aRouteReferencerecord class.- Parameters:
navigationTarget- the value for thenavigationTargetrecord componentrouteParameters- the value for therouteParametersrecord component
-
-
Method Details
-
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). -
routeParameters
Returns the value of therouteParametersrecord component.- Returns:
- the value of the
routeParametersrecord component
-