@ThreadSafe public class StandardURI extends Object implements URI
URI.Factory
Modifier and Type | Field and Description |
---|---|
protected Authority |
mAuthority |
protected int |
mHashCode |
protected String |
mPath |
protected String |
mQuery |
protected String |
mScheme
A hierarchical URI.
|
protected String |
mSchemeSpecificPart |
Modifier | Constructor and Description |
---|---|
|
StandardURI(String scheme,
Authority authority,
String path,
String query) |
protected |
StandardURI(URI baseUri,
String newPath)
Constructs a new URI from a base URI, but with a new path component.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(URI other) |
URI |
createNewPath(String newPath,
boolean checkNormalization) |
boolean |
equals(Object o) |
Authority |
getAuthority() |
String |
getPath() |
String |
getQuery() |
String |
getScheme() |
String |
getSchemeSpecificPart() |
int |
hashCode() |
boolean |
isAbsolute()
Tells whether or not the
URI is absolute. |
protected final String mScheme
URI
is used to hold the URI components as well as to
reuse URI functionality.protected final String mSchemeSpecificPart
protected final Authority mAuthority
protected final String mPath
protected final String mQuery
protected int mHashCode
public StandardURI(String scheme, Authority authority, String path, String query)
scheme
- the scheme string of the URIauthority
- the Authority of the URIpath
- the path component of the URIquery
- the query component of the URIpublic URI createNewPath(String newPath, boolean checkNormalization)
createNewPath
in interface URI
newPath
- the new path componentcheckNormalization
- if true, will check if the path requires normalizationpublic Authority getAuthority()
getAuthority
in interface URI
URI
, null if it does not have onepublic String getQuery()
public String getScheme()
public String getSchemeSpecificPart()
getSchemeSpecificPart
in interface URI
URI
, null if there is no schemepublic boolean isAbsolute()
URI
URI
is absolute.
An URI
is absolute if, and only if, it has a scheme component.
isAbsolute
in interface URI
URI
is absolutepublic int compareTo(URI other)
compareTo
in interface Comparable<URI>
Copyright © 2023. All Rights Reserved.