Class PathMappings<E>

  • Type Parameters:
    E - the type of mapping endpoint
    All Implemented Interfaces:
    java.lang.Iterable<MappedResource<E>>, Dumpable

    @ManagedObject("Path Mappings")
    public class PathMappings<E>
    extends java.lang.Object
    implements java.lang.Iterable<MappedResource<E>>, Dumpable
    Path Mappings of PathSpec to Resource.

    Sorted into search order upon entry into the Set

    • Constructor Detail

      • PathMappings

        public PathMappings()
    • Method Detail

      • dump

        public java.lang.String dump()
        Specified by:
        dump in interface Dumpable
      • dump

        public void dump​(java.lang.Appendable out,
                         java.lang.String indent)
        Description copied from interface: Dumpable
        Dump this object (and children) into an Appendable using the provided indent after any new lines. The indent should not be applied to the first object dumped.
        Specified by:
        dump in interface Dumpable
        out - The appendable to dump to
        indent - The indent to apply after any new lines.
        Throws: - if unable to write to Appendable
      • size

        public int size()
      • reset

        public void reset()
      • removeIf

        public void removeIf​(java.util.function.Predicate<MappedResource<E>> predicate)
      • getMatches

        public java.util.List<MappedResource<E>> getMatches​(java.lang.String path)
        Return a list of MappedResource matches for the specified path.
        path - the path to return matches on
        the list of mapped resource the path matches on
      • iterator

        public java.util.Iterator<MappedResource<E>> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<E>
      • asPathSpec

        public static PathSpec asPathSpec​(java.lang.String pathSpecString)
      • put

        public boolean put​(java.lang.String pathSpecString,
                           E resource)
      • put

        public boolean put​(PathSpec pathSpec,
                           E resource)
      • remove

        public boolean remove​(PathSpec pathSpec)
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object