public interface Uri
For convenience this represents a URI-reference as specified in RFC 3986, Section 4.1. For
brevity and as per common usage it's still called just Uri instead of UriReference.
As a consequence, scheme() returns an Optional, because in contrast to a URI, a relative reference doesn't have a scheme.
isAbsolute() may be used to distinguish between real URIs that have a scheme (isAbsolute() returns true) and relative references
(isAbsolute() returns false).
| Modifier and Type | Method and Description |
|---|---|
org.dmfs.optional.Optional<? extends Authority> |
authority()
Returns the
Optional Authority of the URI reference. |
org.dmfs.optional.Optional<? extends Fragment> |
fragment()
Returns the
Optional Fragment of the URI reference. |
boolean |
isAbsolute()
Returns whether this URI reference is absolute, i.e. a URI.
|
boolean |
isHierarchical()
Returns whether this URI reference is hierarchical.
|
Path |
path()
Returns the
Path of this URI reference. |
org.dmfs.optional.Optional<? extends Query> |
query()
Returns the
Optional Query of the URI reference. |
org.dmfs.optional.Optional<? extends Scheme> |
scheme()
Returns the
Optional Scheme of the URI reference. |
org.dmfs.optional.Optional<? extends Scheme> scheme()
Optional Scheme of the URI reference.Optional Scheme.org.dmfs.optional.Optional<? extends Authority> authority()
Optional Authority of the URI reference.Optional Authority.Path path()
Path of this URI reference.Path. The path is always present, but may be empty.org.dmfs.optional.Optional<? extends Query> query()
Optional Query of the URI reference.Optional Query.org.dmfs.optional.Optional<? extends Fragment> fragment()
Optional Fragment of the URI reference.Optional Fragment.boolean isHierarchical()
true if the URI is hierarchical, false otherwise.boolean isAbsolute()
true if the URI is absolute, false otherwise.