/** * checks, if this {@link URLPath} ends with a slash * * @return {@code true} if it contains a trailing slash, otherwise * {@code false} */ public boolean hasTrailingSlash() { if (isEmpty()) { return false; } return getSegment(size() - 1).isEmpty(); }
@Override public String getEnforcementPointId() { URLPath path = getPath(); return path.isEmpty() ? "" : urlPath.getSegment(0); }