Class PathLocationImpl
java.lang.Object
dev.webfx.platform.windowlocation.spi.impl.PathLocationImpl
- All Implemented Interfaces:
PathLocation
- Direct Known Subclasses:
BrowsingLocationImpl
,PathStateLocationImpl
- Author:
- Bruno Salmon
-
Constructor Summary
ConstructorsConstructorDescriptionPathLocationImpl
(PathLocation pathLocation) PathLocationImpl
(String path) PathLocationImpl
(String pathname, String queryString, String fragment) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Implementing equals() and hashCode() so a location can be identified in the history from a path location.The fragment is the part of the URL after the '#'.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 '?'.int
hashCode()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface dev.webfx.platform.windowlocation.spi.PathLocation
getHash, getPath, getSearch
-
Constructor Details
-
PathLocationImpl
-
PathLocationImpl
-
PathLocationImpl
-
-
Method Details
-
getPathname
Description copied from interface:PathLocation
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.- Specified by:
getPathname
in interfacePathLocation
- Returns:
- A String containing an initial '/' followed by the path of the URL
-
getQueryString
Description copied from interface:PathLocation
The queryString is the part of the URL after the '?'. This is often used for parameter passing.- Specified by:
getQueryString
in interfacePathLocation
- Returns:
- the queryString
-
getFragment
Description copied from interface:PathLocation
The fragment is the part of the URL after the '#'. This is often used for parameter passing.- Specified by:
getFragment
in interfacePathLocation
- Returns:
- the fragment
-
equals
Implementing equals() and hashCode() so a location can be identified in the history from a path location. So we allow super classes and consider only the pathname, the queryString and the fragment. -
hashCode
public int hashCode()
-