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 TypeMethodDescriptionbooleanImplementing 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 '?'.inthashCode()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.webfx.platform.windowlocation.spi.PathLocation
getHash, getPath, getSearch
-
Constructor Details
-
PathLocationImpl
-
PathLocationImpl
-
PathLocationImpl
-
-
Method Details
-
getPathname
Description copied from interface:PathLocationA 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:
getPathnamein interfacePathLocation- Returns:
- A String containing an initial '/' followed by the path of the URL
-
getQueryString
Description copied from interface:PathLocationThe queryString is the part of the URL after the '?'. This is often used for parameter passing.- Specified by:
getQueryStringin interfacePathLocation- Returns:
- the queryString
-
getFragment
Description copied from interface:PathLocationThe fragment is the part of the URL after the '#'. This is often used for parameter passing.- Specified by:
getFragmentin 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()
-