@NotThreadSafe public abstract class AbstractSimpleURL extends Object implements ISimpleURL
URL.| Modifier and Type | Field and Description |
|---|---|
protected Map<String,String> |
m_aParams |
protected String |
m_sAnchor |
EMPTY_URL_STRING| Constructor and Description |
|---|
AbstractSimpleURL() |
AbstractSimpleURL(IURLData aURL) |
AbstractSimpleURL(String sHref) |
AbstractSimpleURL(String sHref,
Map<String,String> aParams) |
AbstractSimpleURL(String sHref,
Map<String,String> aParams,
String sAnchor) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
directGetParams() |
boolean |
equals(Object o) |
Map<String,String> |
getAllParams() |
String |
getAnchor() |
String |
getAsString() |
String |
getAsStringWithEncodedParameters() |
String |
getAsStringWithEncodedParameters(Charset aParameterCharset) |
String |
getAsStringWithEncodedParameters(String sParameterCharset)
Deprecated.
|
String |
getParam(String sKey)
Get the parameter value of the given key.
|
int |
getParamCount() |
String |
getPath() |
IURLProtocol |
getProtocol() |
boolean |
hasAnchor() |
int |
hashCode() |
boolean |
hasKnownProtocol() |
boolean |
hasParams() |
String |
toString() |
public AbstractSimpleURL()
public AbstractSimpleURL(@Nonnull String sHref, @Nullable Map<String,String> aParams)
public AbstractSimpleURL(@Nonnull String sHref, @Nullable Map<String,String> aParams, @Nullable String sAnchor)
@Nullable public final IURLProtocol getProtocol()
getProtocol in interface IURLDatanull for an unknown
protocol.public final boolean hasKnownProtocol()
hasKnownProtocol in interface IURLDatatrue if the URL has a known protocolpublic final boolean hasParams()
@Nonnegative public final int getParamCount()
getParamCount in interface IURLData@Nonnull @ReturnsMutableObject(reason="design") public final Map<String,String> directGetParams()
directGetParams in interface IURLDatanull.@Nonnull @ReturnsMutableCopy public final Map<String,String> getAllParams()
getAllParams in interface IURLDatanull.public final boolean hasAnchor()
@Nullable public final String getParam(@Nullable String sKey)
ISimpleURLgetParam in interface ISimpleURLsKey - The key to check. May be null.null if no such parameter is present.@Nonnull public final String getAsString()
getAsString in interface IHasStringRepresentationgetAsString in interface ISimpleURL@Nonnull public final String getAsStringWithEncodedParameters()
getAsStringWithEncodedParameters in interface ISimpleURLURLUtils.CHARSET_URL.@Nonnull @Deprecated public final String getAsStringWithEncodedParameters(@Nonnull@Nonempty String sParameterCharset)
getAsStringWithEncodedParameters in interface ISimpleURLsParameterCharset - The charset used for encoding the parameters. May neither be
null nor empty.@Nonnull public final String getAsStringWithEncodedParameters(@Nonnull Charset aParameterCharset)
getAsStringWithEncodedParameters in interface ISimpleURLaParameterCharset - The charset used for encoding the parameters. May not be
null.Copyright © 2006–2014 phloc systems. All rights reserved.