/** * @return The name of the page to which the given user-entered URL corresponds. */ public String getPageName(String typedURL) { if (typedURL.equals("")) { return this.defaultPageName; } for (final Entry<URLPattern, String> urlMatcher : pageMap.entrySet()) { if (urlMatcher.getKey().matches(typedURL)) { return urlMatcher.getValue(); } } return null; }
/** * @return The name of the page to which the given user-entered URL corresponds. */ public String getPageName(String typedURL) { if (typedURL.equals("")) { return this.defaultPageName; } for (final Entry<URLPattern, String> urlMatcher : pageMap.entrySet()) { if (urlMatcher.getKey().matches(typedURL)) { return urlMatcher.getValue(); } } return null; }