@Override public boolean test(String s) { for (PathSpec spec : specs) { if (spec.matches(s)) { return true; } } return false; }
@Override public boolean test(String s) { for (PathSpec spec : specs) { if (spec.matches(s)) { return true; } } return false; }
public MappedResource<E> getMatch(String path) { if (path.equals("/") && rootResource != null) { return rootResource; } int len = mappings.size(); for (int i = 0; i < len; i++) { MappedResource<E> mr = mappings.get(i); if (mr.getPathSpec().matches(path)) { return mr; } } return defaultResource; }
public MappedResource<E> getMatch(String path) { if (path.equals("/") && rootResource != null) { return rootResource; } int len = mappings.size(); for (int i = 0; i < len; i++) { MappedResource<E> mr = mappings.get(i); if (mr.getPathSpec().matches(path)) { return mr; } } return defaultResource; }
if (candidate==null) break; if (candidate.getPathSpec().matches(path)) return candidate; i=candidate.getPathSpec().getPrefix().length()-1; if (candidate==null) break; if (candidate.getPathSpec().matches(path)) return candidate; i=candidate.getPathSpec().getPrefix().length()-1; if (candidate!=null && candidate.getPathSpec().matches(path)) return candidate; if (mr.getPathSpec().matches(path)) return mr;
if (candidate==null) break; if (candidate.getPathSpec().matches(path)) return candidate; i=candidate.getPathSpec().getPrefix().length()-1; if (candidate==null) break; if (candidate.getPathSpec().matches(path)) return candidate; i=candidate.getPathSpec().getPrefix().length()-1; if (candidate!=null && candidate.getPathSpec().matches(path)) return candidate; if (mr.getPathSpec().matches(path)) return mr;