Interface PathLocation
- All Known Subinterfaces:
BrowsingHistoryLocation
,BrowsingLocation
,PathStateLocation
,WindowLocationProvider
- All Known Implementing Classes:
BrowsingHistoryLocationImpl
,BrowsingLocationImpl
,PathLocationImpl
,PathStateLocationImpl
public interface PathLocation
- Author:
- Bruno Salmon
-
Method Summary
Modifier and TypeMethodDescriptionThe fragment is the part of the URL after the '#'.default String
getHash()
A hash is the portion of the URL that follows the search, including any preceding #.default String
getPath()
A pathname is the portion of a URL that describes a hierarchical path, including the preceding /.The queryString is the part of the URL after the '?'.default String
A search is the portion of the URL that follows the pathname, including any preceding ?.
-
Method Details
-
getPath
-
getPathname
String getPathname()A pathname is the portion of a URL that describes a hierarchical path, including the preceding /. For example, in http://example.com/the/path?the=query#thehash, /the/path is the pathname. It is synonymous with window.location.pathname in web browsers.- Returns:
- A String containing an initial '/' followed by the path of the URL
-
getSearch
A search is the portion of the URL that follows the pathname, including any preceding ?. For example, in http://example.com/the/path?the=query#thehash, ?the=query is the search. It is synonymous with window.location.search in web browsers.- Returns:
- A String containing a '?' followed by the parameters of the URL.
-
getQueryString
String getQueryString()The queryString is the part of the URL after the '?'. This is often used for parameter passing.- Returns:
- the queryString
-
getHash
A hash is the portion of the URL that follows the search, including any preceding #. For example, in http://example.com/the/path?the=query#thehash, #thehash is the hash.- Returns:
- A String containing a '#' followed by the fragment identifier of the URL.
-
getFragment
String getFragment()The fragment is the part of the URL after the '#'. This is often used for parameter passing.- Returns:
- the fragment
-