Todo
we can probably do this faster using a trie type structure, but I think the current impl should perform ok most of the time
| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private volatile int[] | lengths
lengths of all registered paths |
| private Map | pathTemplateMap
Map of path template stem to the path templates that share the same base. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized PathTemplateMatcher | |
| public synchronized PathTemplateMatcher | |
| public synchronized PathTemplateMatcher | |
| private void | |
| public synchronized T | |
| pack-priv Map | |
| public Set | |
| private PathTemplateMatcher. | handleStemMatch(Set<PathTemplateMatcher<T>.
|
| public PathTemplateMatcher. | |
| public synchronized PathTemplateMatcher | |
| private synchronized PathTemplateMatcher | |
| private String |
| lengths | back to summary |
|---|---|
| private volatile int[] lengths lengths of all registered paths | |
| pathTemplateMap | back to summary |
|---|---|
| private Map<String, Set<PathTemplateMatcher<T>. Map of path template stem to the path templates that share the same base. | |
| PathTemplateMatcher | back to summary |
|---|---|
| public PathTemplateMatcher() | |
| add | back to summary |
|---|---|
| public synchronized PathTemplateMatcher | |
| add | back to summary |
|---|---|
| public synchronized PathTemplateMatcher | |
| addAll | back to summary |
|---|---|
| public synchronized PathTemplateMatcher | |
| buildLengths | back to summary |
|---|---|
| private void buildLengths() | |
| get | back to summary |
|---|---|
| public synchronized T get(String template) | |
| getPathTemplateMap | back to summary |
|---|---|
| pack-priv Map | |
| getPathTemplates | back to summary |
|---|---|
| public Set | |
| handleStemMatch | back to summary |
|---|---|
| private PathTemplateMatcher. | |
| match | back to summary |
|---|---|
| public PathTemplateMatcher. | |
| remove | back to summary |
|---|---|
| public synchronized PathTemplateMatcher | |
| remove | back to summary |
|---|---|
| private synchronized PathTemplateMatcher | |
| trimBase | back to summary |
|---|---|
| private String trimBase(PathTemplate template) | |
| Modifier and Type | Field and Description |
|---|---|
| private final T |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public T |
| value | back to summary |
|---|---|
| private final T value | |
| PathMatchResult | back to summary |
|---|---|
| public PathMatchResult(Map<String, String> parameters, String matchedTemplate, T value) | |
| getValue | back to summary |
|---|---|
| public T getValue() | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final PathTemplate | |
| pack-priv final T |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public int | compareTo(PathTemplateMatcher<T>.
the object to be compared. oImplements java. Compares this object with the specified object for order. |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. Indicates whether some other object is "equal to" this one. |
| public int |
| template | back to summary |
|---|---|
| pack-priv final PathTemplate template | |
| value | back to summary |
|---|---|
| pack-priv final T value | |
| PathTemplateHolder | back to summary |
|---|---|
| private PathTemplateHolder(T value, PathTemplate template) | |
| compareTo | back to summary |
|---|---|
| public int compareTo(PathTemplateMatcher<T>. Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |