Package com.vaadin.flow.router
Record Class RouteParentReference
java.lang.Object
java.lang.Record
com.vaadin.flow.router.RouteParentReference
- Record Components:
- the navigation target classrouteParameters- the route parameters to resolve the navigation target with
- All Implemented Interfaces:
Serializable
public record RouteParentReference(Class<? extends Component> navigationTarget, RouteParameters routeParameters)
extends Record
implements Serializable
A reference to a route in a logical navigation hierarchy, consisting of the
navigation target class and the
RouteParameters it should be resolved
with.
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.
- Author:
- Vaadin Ltd
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRouteParentReference(Class<? extends Component> navigationTarget, RouteParameters routeParameters) Creates an instance of aRouteParentReferencerecord 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
-
RouteParentReference
public RouteParentReference(Class<? extends Component> navigationTarget, RouteParameters routeParameters) Creates an instance of aRouteParentReferencerecord 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
-