public Object match(final String path) {
			if (rules.containsKey(path)) {
				return rules.get(path);
			}

			int n = path.lastIndexOf('/');
			for (Iterator it = lpatterns.iterator(); it.hasNext();) {
				String pattern = (String) it.next();
				if (path.substring(n).endsWith(pattern)) {
					return rules.get(pattern);
				}
			}

			for (Iterator it = rpatterns.iterator(); it.hasNext();) {
				String pattern = (String) it.next();
				if (path.startsWith(pattern)) {
					return rules.get(pattern);
				}
			}

			return null;
		}