public class DefaultPathMapper extends Object implements Serializable, PathMapper
| Constructor and Description |
|---|
DefaultPathMapper() |
| Modifier and Type | Method and Description |
|---|---|
String |
get(String path)
Retrieve appropriate key by matching patterns with supplied path.
|
Collection<String> |
getAll(String path)
Retrieve all mappings which match a supplied path.
|
void |
put(String key,
String pattern)
Add a key and appropriate matching pattern.
|
protected String |
removeRedundantSlashes(String path)
Reduces sequences of more than one consecutive forward slash ("/") to a
single slash (see: https://studio.atlassian.com/browse/PLUG-597).
|
String |
toString() |
public void put(String key, String pattern)
PathMapperput in interface PathMapperpublic String get(String path)
PathMapperget in interface PathMapperpublic Collection<String> getAll(String path)
PathMappergetAll in interface PathMapperprotected String removeRedundantSlashes(String path)
Reduces sequences of more than one consecutive forward slash ("/") to a single slash (see: https://studio.atlassian.com/browse/PLUG-597).
path - any string, including null (e.g. "foo//bar")"foo/bar")Copyright © 2014 Atlassian. All rights reserved.