public final class RelativeUri extends java.lang.Object implements Uri
Uri as per RFC 3986, Section 4.2. A relative Uri has no Scheme. Since scheme relative references are less common, this class supports only relative references without Scheme and Authority. To create a scheme relative reference use StructuredUri.StructuredUri(Optional, Optional, Path, Optional, Optional) and pass None.none() as the Scheme.| Constructor and Description |
|---|
RelativeUri(Fragment fragment) |
RelativeUri(Path path) |
RelativeUri(Path path,
org.dmfs.optional.Optional<Query> query,
org.dmfs.optional.Optional<Fragment> fragment) |
RelativeUri(Path path,
Query query) |
RelativeUri(Path path,
Query query,
Fragment fragment) |
RelativeUri(Query query) |
RelativeUri(Query query,
Fragment fragment) |
| 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. |
public RelativeUri(Path path)
public RelativeUri(Query query)
public RelativeUri(Fragment fragment)
public org.dmfs.optional.Optional<? extends Scheme> scheme()
UriOptional Scheme of the URI reference.public org.dmfs.optional.Optional<? extends Authority> authority()
UriOptional Authority of the URI reference.public Path path()
UriPath of this URI reference.public org.dmfs.optional.Optional<? extends Query> query()
UriOptional Query of the URI reference.public org.dmfs.optional.Optional<? extends Fragment> fragment()
UriOptional Fragment of the URI reference.public boolean isHierarchical()
UriisHierarchical in interface Uritrue if the URI is hierarchical, false otherwise.public boolean isAbsolute()
UriisAbsolute in interface Uritrue if the URI is absolute, false otherwise.