public class URIRequirementBuilder extends Object
Modifier and Type | Method and Description |
---|---|
List<DomainRequirement> |
build()
Builds the list of requirements.
|
static URIRequirementBuilder |
create()
Creates an empty builder.
|
URIRequirementBuilder |
duplicate()
Creates a new builder with the same requirements as this builder.
|
static URIRequirementBuilder |
fromUri(String uri)
Creates a new builder using the supplied URI.
|
URIRequirementBuilder |
withHostname(String hostname)
Replace any hostname requirements with the supplied hostname.
|
URIRequirementBuilder |
withHostnamePort(String hostname,
int port)
Replace any hostname or hostname:port requirements with the supplied hostname and port.
|
URIRequirementBuilder |
withoutHostname()
Removes any hostname or hostname:port requirements.
|
URIRequirementBuilder |
withoutHostnamePort()
Removes any hostname:port requirements.
|
URIRequirementBuilder |
withoutPath()
Removes any path requirements.
|
URIRequirementBuilder |
withoutScheme()
Removes any scheme requirements.
|
URIRequirementBuilder |
withPath(String path)
Replace any path requirements with the supplied path.
|
URIRequirementBuilder |
withScheme(String scheme)
Replace any scheme requirements with the supplied scheme.
|
URIRequirementBuilder |
withUri(String uri)
Replaces the requirements with those of the supplied URI.
|
@NonNull public static URIRequirementBuilder create()
@NonNull public URIRequirementBuilder duplicate()
@NonNull public static URIRequirementBuilder fromUri(@CheckForNull String uri)
uri
- the URI to create the requirements of.@NonNull public URIRequirementBuilder withUri(@CheckForNull String uri)
uri
- the URI.this
.@NonNull public URIRequirementBuilder withoutScheme()
this
.@NonNull public URIRequirementBuilder withoutPath()
this
.@NonNull public URIRequirementBuilder withoutHostname()
this
.@NonNull public URIRequirementBuilder withoutHostnamePort()
this
.@NonNull public URIRequirementBuilder withScheme(@CheckForNull String scheme)
scheme
- the scheme to use as a requirementthis
.@NonNull public URIRequirementBuilder withPath(@CheckForNull String path)
path
- the path to use as a requirementthis
.@NonNull public URIRequirementBuilder withHostname(@CheckForNull String hostname)
hostname
- the hostname to use as a requirementthis
.@NonNull public URIRequirementBuilder withHostnamePort(@CheckForNull String hostname, int port)
hostname
- the hostname to use as a requirement or (@code null} to not add any requirementport
- the port or -1
to not add HostnamePortRequirement
sthis
.@NonNull public List<DomainRequirement> build()
Copyright © 2016. All rights reserved.