/** * Build a {@code UriComponents} instance from the various components * contained in this builder. * @param encoded whether all the components set in this builder are * encoded ({@code true}) or not ({@code false}) * @return the URI components */ public UriComponents build(boolean encoded) { return buildInternal(encoded ? EncodingHint.FULLY_ENCODED : this.encodeTemplate ? EncodingHint.ENCODE_TEMPLATE : EncodingHint.NONE); }
/** * Build a {@code UriComponents} instance from the various components * contained in this builder. * @param encoded whether all the components set in this builder are * encoded ({@code true}) or not ({@code false}) * @return the URI components */ public UriComponents build(boolean encoded) { return buildInternal(encoded ? EncodingHint.FULLY_ENCODED : this.encodeTemplate ? EncodingHint.ENCODE_TEMPLATE : EncodingHint.NONE); }
@Override public URI build(Object... uriVariables) { return buildInternal(EncodingHint.ENCODE_TEMPLATE).expand(uriVariables).toUri(); }
@Override public URI build(Map<String, ?> uriVariables) { return buildInternal(EncodingHint.ENCODE_TEMPLATE).expand(uriVariables).toUri(); }
@Override public URI build(Object... uriVariables) { return buildInternal(EncodingHint.ENCODE_TEMPLATE).expand(uriVariables).toUri(); }
@Override public URI build(Map<String, ?> uriVariables) { return buildInternal(EncodingHint.ENCODE_TEMPLATE).expand(uriVariables).toUri(); }
/** * Build a URI String. * <p>Effectively, a shortcut for building, encoding, and returning the * String representation: * <pre class="code"> * String uri = builder.build().encode().toUriString() * </pre> * <p>However if {@link #uriVariables(Map) URI variables} have been provided * then the URI template is pre-encoded separately from URI variables (see * {@link #encode()} for details), i.e. equivalent to: * <pre> * String uri = builder.encode().build().toUriString() * </pre> * @since 4.1 * @see UriComponents#toUriString() */ public String toUriString() { return this.uriVariables.isEmpty() ? build().encode().toUriString() : buildInternal(EncodingHint.ENCODE_TEMPLATE).toUriString(); }
/** * Build a URI String. * <p>Effectively, a shortcut for building, encoding, and returning the * String representation: * <pre class="code"> * String uri = builder.build().encode().toUriString() * </pre> * <p>However if {@link #uriVariables(Map) URI variables} have been provided * then the URI template is pre-encoded separately from URI variables (see * {@link #encode()} for details), i.e. equivalent to: * <pre> * String uri = builder.encode().build().toUriString() * </pre> * @since 4.1 * @see UriComponents#toUriString() */ public String toUriString() { return this.uriVariables.isEmpty() ? build().encode().toUriString() : buildInternal(EncodingHint.ENCODE_TEMPLATE).toUriString(); }
/** * Build a {@code UriComponents} instance from the various components * contained in this builder. * @param encoded whether all the components set in this builder are * encoded ({@code true}) or not ({@code false}) * @return the URI components */ public UriComponents build(boolean encoded) { return buildInternal(encoded ? EncodingHint.FULLY_ENCODED : this.encodeTemplate ? EncodingHint.ENCODE_TEMPLATE : EncodingHint.NONE); }
@Override public URI build(Map<String, ?> uriVariables) { return buildInternal(EncodingHint.ENCODE_TEMPLATE).expand(uriVariables).toUri(); }
@Override public URI build(Object... uriVariables) { return buildInternal(EncodingHint.ENCODE_TEMPLATE).expand(uriVariables).toUri(); }
/** * Build a URI String. * <p>Effectively, a shortcut for building, encoding, and returning the * String representation: * <pre class="code"> * String uri = builder.build().encode().toUriString() * </pre> * <p>However if {@link #uriVariables(Map) URI variables} have been provided * then the URI template is pre-encoded separately from URI variables (see * {@link #encode()} for details), i.e. equivalent to: * <pre> * String uri = builder.encode().build().toUriString() * </pre> * @since 4.1 * @see UriComponents#toUriString() */ public String toUriString() { return this.uriVariables.isEmpty() ? build().encode().toUriString() : buildInternal(EncodingHint.ENCODE_TEMPLATE).toUriString(); }