Package slash.navigation.routes.impl
Record Class RouteModel
java.lang.Object
java.lang.Record
slash.navigation.routes.impl.RouteModel
A model that encapsulates a
Route.- Author:
- Christian Pesch
-
Constructor Summary
ConstructorsConstructorDescriptionRouteModel(CategoryTreeNode category, Route route) Creates an instance of aRouteModelrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncategory()Returns the value of thecategoryrecord component.booleanIndicates whether some other object is "equal to" this one.Returns the creator of the route, ornullif it cannot be determined.getName()getUrl()inthashCode()Returns a hash code value for this object.route()Returns the value of therouterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
getName
-
getDescription
-
getUrl
-
getCreator
Returns the creator of the route, ornullif it cannot be determined. UnlikegetName(),getDescription()andgetUrl(), which return"?"on error for display, this returnsnullso the creator comparator can sort such rows last viaComparator.nullsLast(java.util.Comparator<? super T>). The display path (RouteHelper.formatCreator) keeps its own null/error handling. -
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). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. -
category
Returns the value of thecategoryrecord component.- Returns:
- the value of the
categoryrecord component
-
route
Returns the value of therouterecord component.- Returns:
- the value of the
routerecord component
-