private static <V> void rejectDuplicateMapping(
            Iterable<V> values, Function<V, Route> routeResolver,
            BiConsumer<Route, Route> rejectionHandler) {

        final Map<String, List<Route>> triePath2Routes = new HashMap<>();
        for (V v : values) {
            final Route route = routeResolver.apply(v);
            final boolean hasTriePath = route.pathType().hasTriePath();
            if (!hasTriePath) {
                continue;
            }
            final String triePath = route.paths().get(1);
            final List<Route> existingRoutes =
                    triePath2Routes.computeIfAbsent(triePath, unused -> new ArrayList<>());
            for (Route existingRoute : existingRoutes) {
                if (route.hasConflicts(existingRoute)) {
                    rejectionHandler.accept(route, existingRoute);
                    return;
                }
            }

            existingRoutes.add(route);
        }
    }
Returns only the sequential implementation of {@link Router}.
core/src/main/java/com/linecorp/armeria/server/Routers.java