1package dev.rafex.ether.http.core;
30import java.util.Optional;
32public final class RouteMatcher {
34 private RouteMatcher() {
37 public static Optional<RouteMatch>
match(
final String relPath,
final List<Route> routes) {
38 if (routes ==
null || routes.isEmpty()) {
39 return Optional.empty();
41 for (
final var route : routes) {
42 final var
match = route.match(relPath);
43 if (
match.isPresent()) {
47 return Optional.empty();
static Optional< RouteMatch > match(final String relPath, final List< Route > routes)
record RouteMatch(Route route, Map< String, String > pathParams)