Package io.github.grumpystuff.grumpyrest
Record Class RouteMatchResult
java.lang.Object
java.lang.Record
io.github.grumpystuff.grumpyrest.RouteMatchResult
- Record Components:
route- the route that was matchedpathArguments- arguments that were bound to path parameters
The result returned by
RestApi.match(RequestCycle) and Route.match(RequestCycle).-
Constructor Summary
ConstructorsConstructorDescriptionRouteMatchResult(Route route, List<PathArgument> pathArguments) Compact constructor. -
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 thepathArgumentsrecord component.route()Returns the value of therouterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RouteMatchResult
Compact constructor.- Parameters:
route- the route that was matchedpathArguments- arguments that were bound to path parameters
-
-
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). -
route
Returns the value of therouterecord component.- Returns:
- the value of the
routerecord component
-
pathArguments
Returns the value of thepathArgumentsrecord component.- Returns:
- the value of the
pathArgumentsrecord component
-