Package com.helger.commons.url
Class URLData
- java.lang.Object
-
- com.helger.commons.url.URLData
-
- All Implemented Interfaces:
ISimpleURL
@Immutable public class URLData extends Object implements ISimpleURL
Read-only implementation ofISimpleURL- Author:
- Philip Helger
-
-
Field Summary
Fields Modifier and Type Field Description static URLDataEMPTY_URL_DATAThe string representing an empty URL.
-
Constructor Summary
Constructors Constructor Description URLData(String sPath)URLData(String sPath, URLParameterList aParams)URLData(String sPath, URLParameterList aParams, String sAnchor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetAnchor()StringgetPath()inthashCode()URLParameterListparams()StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.helger.commons.url.ISimpleURL
getAsStringWithEncodedParameters, getAsStringWithEncodedParameters, getAsStringWithoutEncodedParameters, getAsURI, getAsURL, getProtocol, hasAnchor, hasAnchor, hasKnownProtocol
-
-
-
-
Field Detail
-
EMPTY_URL_DATA
public static final URLData EMPTY_URL_DATA
The string representing an empty URL. Must contain at least one character.
-
-
Method Detail
-
getPath
@Nonnull public final String getPath()
- Specified by:
getPathin interfaceISimpleURL- Returns:
- The path part of the URL (everything before the "?" and the "#",
incl. the protocol). Never
nullbut maybe empty (e.g. for "?x=y").
-
params
@Nonnull @ReturnsMutableObject public final URLParameterList params()
- Specified by:
paramsin interfaceISimpleURL- Returns:
- A map of all query string parameters. May be
null.
-
getAnchor
@Nullable public final String getAnchor()
- Specified by:
getAnchorin interfaceISimpleURL- Returns:
- The name of the anchor (everything after the "#") or
nullif none is defined.
-
-