| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| ConstantMatcher |
|
| 1.0;1 |
| 1 | package org.webslinger.rules; | |
| 2 | ||
| 3 | import javax.servlet.ServletRequest; | |
| 4 | ||
| 5 | public class ConstantMatcher implements PathMatcher { | |
| 6 | private final String path; | |
| 7 | ||
| 8 | 11 | public ConstantMatcher(String path) { |
| 9 | 11 | this.path = path; |
| 10 | 11 | } |
| 11 | ||
| 12 | public String getPath() { | |
| 13 | 0 | return path; |
| 14 | } | |
| 15 | ||
| 16 | public boolean matches(ServletRequest request, String path) { | |
| 17 | 71 | return this.path.equals(path); |
| 18 | } | |
| 19 | ||
| 20 | public String toString() { | |
| 21 | 0 | return "ConstantMatcher(" + getPath() + ")"; |
| 22 | } | |
| 23 | } |