Class PathMatcher<L>

    • Constructor Detail

      • PathMatcher

        public PathMatcher​(Tuple<L> ev)
    • Method Detail

      • provide

        public static <L> PathMatcher<L> provide​(L extractions,
                                                 Tuple<L> evidence$17)
        Creates a PathMatcher that always matches, consumes nothing and extracts the given Tuple of values.
        Parameters:
        extractions - (undocumented)
        evidence$17 - (undocumented)
        Returns:
        (undocumented)
      • apply

        public static <L> PathMatcher<L> apply​(Uri.Path prefix,
                                               L extractions,
                                               Tuple<L> evidence$18)
        Creates a PathMatcher that matches and consumes the given path prefix and extracts the given list of extractions. If the given prefix is empty the returned PathMatcher matches always and consumes nothing.
        Parameters:
        prefix - (undocumented)
        extractions - (undocumented)
        evidence$18 - (undocumented)
        Returns:
        (undocumented)
      • apply

        public static <L> PathMatcher<L> apply​(PathMatcher<L> magnet)
        Provoke implicit conversions to PathMatcher to be applied
      • EmptyMatch

        public static PathMatcher.Matched<scala.Tuple1<java.lang.String>> EmptyMatch()
        The empty match returned when a Regex matcher matches the empty path
      • _stringExtractionPair2PathMatcher

        public static <T> PathMatcher<scala.Tuple1<T>> _stringExtractionPair2PathMatcher​(scala.Tuple2<java.lang.String,​T> tuple)
      • _segmentStringToPathMatcher

        public static PathMatcher<scala.runtime.BoxedUnit> _segmentStringToPathMatcher​(java.lang.String segment)
      • _stringNameOptionReceptacle2PathMatcher

        public static PathMatcher<scala.runtime.BoxedUnit> _stringNameOptionReceptacle2PathMatcher​(NameOptionReceptacle<java.lang.String> nr)
      • _regex2PathMatcher

        public static PathMatcher<scala.Tuple1<java.lang.String>> _regex2PathMatcher​(scala.util.matching.Regex regex)
      • _valueMap2PathMatcher

        public static <T> PathMatcher<scala.Tuple1<T>> _valueMap2PathMatcher​(scala.collection.immutable.Map<java.lang.String,​T> valueMap)
      • tmap

        public <R> PathMatcher<R> tmap​(scala.Function1<L,​R> f,
                                       Tuple<R> evidence$4)
      • tflatMap

        public <R> PathMatcher<R> tflatMap​(scala.Function1<L,​scala.Option<R>> f,
                                           Tuple<R> evidence$5)
      • repeat

        public PathMatcher<java.lang.Object> repeat​(int count,
                                                    PathMatcher.Lift<L,​scala.collection.immutable.List> lift)
        Same as repeat(min = count, max = count).
        Parameters:
        count - (undocumented)
        lift - (undocumented)
        Returns:
        (undocumented)
      • repeat

        public PathMatcher<java.lang.Object> repeat​(int count,
                                                    PathMatcher<scala.runtime.BoxedUnit> separator,
                                                    PathMatcher.Lift<L,​scala.collection.immutable.List> lift)
        Same as repeat(min = count, max = count, separator = separator).
        Parameters:
        count - (undocumented)
        separator - (undocumented)
        lift - (undocumented)
        Returns:
        (undocumented)
      • repeat

        public PathMatcher<java.lang.Object> repeat​(int min,
                                                    int max,
                                                    PathMatcher<scala.runtime.BoxedUnit> separator,
                                                    PathMatcher.Lift<L,​scala.collection.immutable.List> lift)
        Turns this PathMatcher into one that matches a number of times (with the given separator) and potentially extracts a List of the underlying matcher's extractions. If less than min applications of the underlying matcher have succeeded the produced matcher fails, otherwise it matches up to the given max number of applications. Note that it won't fail even if more than max applications could succeed! The "surplus" path elements will simply be left unmatched.

        The result type depends on the type of the underlying matcher:

        If a matcher is of typethen matcher.repeat(...) is of type
        PathMatcher0PathMatcher0
        PathMatcher1[T]PathMatcher1[List[T]
        PathMatcher[L :Tuple]PathMatcher[List[L}
        Parameters:
        min - (undocumented)
        max - (undocumented)
        separator - (undocumented)
        lift - (undocumented)
        Returns:
        (undocumented)