Package thredds.logs
Class PathMatcher
- java.lang.Object
-
- thredds.logs.PathMatcher
-
public class PathMatcher extends Object
Duplicate thredds.servlet.PathMatcher- Since:
- Mar 24, 2009
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PathMatcher.Match
-
Constructor Summary
Constructors Constructor Description PathMatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PathMatcher.Match
get(String key)
See if this object already exists in the collection, using equals().Iterator
iterator()
Get an iterator over the values, in sorted order.PathMatcher.Match
match(String path)
Find the longest match.void
put(String root)
Add an object to the collection to be searched by a String key.
-
-
-
Method Detail
-
put
public void put(String root)
Add an object to the collection to be searched by a String key.- Parameters:
root
- sort key
-
get
public PathMatcher.Match get(String key)
See if this object already exists in the collection, using equals().- Parameters:
key
- find object that has this key- Returns:
- existing object, else null.
-
iterator
public Iterator iterator()
Get an iterator over the values, in sorted order.- Returns:
- iterator
-
match
public PathMatcher.Match match(String path)
Find the longest match.- Parameters:
path
- find object with longest match where path.startsWith( key)- Returns:
- the value whose key is the longest that matches path, or null if none
-
-