/** * Generate an {@link Address} representing the current literal state of this {@link AddressBuilder}. * <p> * (Does not apply parameterization. E.g. The URL `/{foo}` will be treated as literal text, as opposed to calling * {@link #build()}, which would result in `foo` being treated as a parameterized expression) */ protected Address buildLiteral() { if (address == null) { address = new AddressResult(this); } return address; }
@Override public boolean isSchemeSet() { return isSet(protocol); }
@Override public boolean isAnchorSet() { return isSetOrEmpty(anchor); }
@Override public String getPathAndQuery() { StringBuilder result = new StringBuilder(); if (isPathSet()) result.append(getPath()); if (isQuerySet()) result.append('?').append(getQuery()); return result.toString(); }
if (isSet(parent.scheme)) protocol = parent.scheme.toString(); else protocol = null; if (isSet(parent.schemeSpecificPart)) schemeSpecificPart = parent.schemeSpecificPart.toString(); else schemeSpecificPart = null; if (isSet(parent.domain)) host = parent.domain.toString(); else host = null; if (isSet(parent.port)) port = parent.port; else port = null; if (isSet(parent.path)) if (isSet(parent.queries)) { this.queries = Collections.unmodifiableMap(parent.getQueries()); query = toQuery(parent.queries).toString(); if (isSetOrEmpty(parent.anchor)) anchor = parent.anchor.toString(); else
@Override public String getPathAndQuery() { StringBuilder result = new StringBuilder(); if (isPathSet()) result.append(getPath()); if (isQuerySet()) result.append('?').append(getQuery()); return result.toString(); }
if (isSet(parent.scheme)) protocol = parent.scheme.toString(); else protocol = null; if (isSet(parent.schemeSpecificPart)) schemeSpecificPart = parent.schemeSpecificPart.toString(); else schemeSpecificPart = null; if (isSet(parent.domain)) host = parent.domain.toString(); else host = null; if (isSet(parent.port)) port = parent.port; else port = null; if (isSet(parent.path)) if (isSet(parent.queries)) { this.queries = Collections.unmodifiableMap(parent.getQueries()); query = toQuery(parent.queries).toString(); if (isSetOrEmpty(parent.anchor)) anchor = parent.anchor.toString(); else
@Override public boolean isPortSet() { return isSet(port); }
@Override public boolean isAnchorSet() { return isSetOrEmpty(anchor); }
/** * Generate an {@link Address} representing the current literal state of this {@link AddressBuilder}. * <p> * (Does not apply parameterization. E.g. The URL `/{foo}` will be treated as literal text, as opposed to calling * {@link #build()}, which would result in `foo` being treated as a parameterized expression) */ protected Address buildLiteral() { if (address == null) { address = new AddressResult(this); } return address; }
@Override public boolean isPathSet() { return isSet(path); }
@Override public boolean isSchemeSet() { return isSet(protocol); }
@Override public boolean isPortSet() { return isSet(port); }
@Override public boolean isQuerySet() { return isSet(query); } }
@Override public boolean isPathSet() { return isSet(path); }
@Override public boolean isDomainSet() { return isSet(host); }
@Override public boolean isSchemeSpecificPartSet() { return isSet(schemeSpecificPart); }
@Override public boolean isDomainSet() { return isSet(host); }
@Override public boolean isSchemeSpecificPartSet() { return isSet(schemeSpecificPart); }
@Override public boolean isQuerySet() { return isSet(query); } }