@NotThreadSafe public class SimpleURL extends Object implements ISimpleURL, ICloneable<SimpleURL>
URL.| Constructor and Description |
|---|
SimpleURL() |
SimpleURL(IURLData aURL) |
SimpleURL(String sHref) |
SimpleURL(String sHref,
Charset aCharset) |
SimpleURL(String sHref,
Charset aCharset,
Map<String,String> aParams) |
SimpleURL(String sHref,
Charset aCharset,
Map<String,String> aParams,
String sAnchor) |
SimpleURL(String sHref,
Map<String,String> aParams) |
SimpleURL(String sHref,
Map<String,String> aParams,
String sAnchor) |
SimpleURL(URL aURL) |
SimpleURL(URL aURL,
Charset aCharset) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAsStringWithEncodedParameters, getAsStringWithEncodedParameters, getAsStringWithoutEncodedParametersgetProtocol, hasKnownProtocolpublic SimpleURL()
public SimpleURL(@Nonnull String sHref, @Nonnull Charset aCharset, @Nullable Map<String,String> aParams)
public SimpleURL(@Nonnull String sHref, @Nullable Map<String,String> aParams, @Nullable String sAnchor)
public SimpleURL(@Nonnull String sHref, @Nonnull Charset aCharset, @Nullable Map<String,String> aParams, @Nullable String sAnchor)
public final boolean hasParams()
@Nonnegative public final int getParamCount()
getParamCount in interface IURLData@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 @ReturnsMutableObject(value="design") public final ICommonsOrderedMap<String,String> directGetAllParams()
directGetAllParams in interface IURLDatanull.@Nonnull @ReturnsMutableCopy public final ICommonsOrderedMap<String,String> getAllParams()
getAllParams in interface IURLDatanull.@Nonnull public SimpleURL add(@Nonnull @Nonempty String sKey)
sKey - The name of the parameter. May neither be null nor
empty.@Nonnull public SimpleURL addIfNonNull(@Nonnull @Nonempty String sKey, @Nullable String sValue)
@Nonnull public SimpleURL addIf(@Nonnull @Nonempty String sKey, @Nullable String sValue, @Nonnull Predicate<String> aFilter)
sKey - Parameter name. May neither be null nor empty.sValue - Parameter value. May not be null if the predicate
evaluates to true.aFilter - The predicate to be evaluated on the value. May not be
null.@Nonnull public SimpleURL remove(@Nullable String sKey)
sKey - The key to removepublic final boolean hasAnchor()
@Nonnull public SimpleURL getClone()
getClone in interface ICloneable<SimpleURL>Copyright © 2014–2016 Philip Helger. All rights reserved.