Class UriPathRouter.OrderedMatcher<T>

  • All Implemented Interfaces:
    java.util.function.BiFunction<java.lang.String,​java.util.List<PathRoute<java.lang.String,​T>>,​T>
    Enclosing class:
    UriPathRouter<P,​T>

    static final class UriPathRouter.OrderedMatcher<T>
    extends java.lang.Object
    implements java.util.function.BiFunction<java.lang.String,​java.util.List<PathRoute<java.lang.String,​T>>,​T>
    Finds a match for the given path from an ordered collection of URI patterns.

    Patterns may have three formats:

    • *
    • *<uri-path>
    • <uri-path>*

    This class has no instance state.

    • Constructor Detail

      • OrderedMatcher

        private OrderedMatcher()
    • Method Detail

      • apply

        public T apply​(java.lang.String path,
                       java.util.List<PathRoute<java.lang.String,​T>> routes)
        Specified by:
        apply in interface java.util.function.BiFunction<java.lang.String,​java.util.List<PathRoute<java.lang.String,​T>>,​T>