Package com.mastfrog.url
Class ParsedParameters
java.lang.Object
com.mastfrog.url.Parameters
com.mastfrog.url.ParsedParameters
- All Implemented Interfaces:
URLComponent,Serializable,Iterable<ParametersElement>
public final class ParsedParameters
extends Parameters
implements URLComponent, Iterable<ParametersElement>
The Parameters portion of a URL, e.g.
http://timboudreau.com/foo.html?foo=bar&bar=baz#something- Author:
- Tim Boudreau
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionParsedParameters(ParametersDelimiter delimiter, ParametersElement... elements) ParsedParameters(ParametersElement... elements) -
Method Summary
Modifier and TypeMethodDescriptionvoidAppend this component to a StringBuilder.voidappendTo(StringBuilder sb, ParametersDelimiter delimiter) builder()Create a builder to whichParametersElements may be added conveniently, to construct a Parameters object.booleanGet a human-readable, localized name for this part of the URL.getFirstDecoded(String param) inthashCode()booleanisValid()Determine if this component is in compliance with the RFCs governing URLs and DNS.iterator()static Parametersintsize()toString()toString(ParametersDelimiter delimiter) Methods inherited from class com.mastfrog.url.Parameters
toParsedParametersMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ParsedParameters
-
ParsedParameters
-
-
Method Details
-
getDelimiter
-
getFirst
-
getFirstDecoded
-
getAll
-
parse
-
getElements
- Overrides:
getElementsin classParameters
-
size
public int size() -
unescaped
-
toString
-
toString
-
isValid
public boolean isValid()Description copied from interface:URLComponentDetermine if this component is in compliance with the RFCs governing URLs and DNS.- Specified by:
isValidin interfaceURLComponent- Overrides:
isValidin classParameters- Returns:
- True if this component is valid.
-
getComponentName
Description copied from interface:URLComponentGet a human-readable, localized name for this part of the URL. Useful if an error message needs to be shown.- Specified by:
getComponentNamein interfaceURLComponent- Overrides:
getComponentNamein classParameters- Returns:
- The component name
-
appendTo
Description copied from interface:URLComponentAppend this component to a StringBuilder.- Specified by:
appendToin interfaceURLComponent- Overrides:
appendToin classParameters- Parameters:
sb- A StringBuilder
-
appendTo
-
builder
Create a builder to whichParametersElements may be added conveniently, to construct a Parameters object.- Returns:
- a builder for
Parametersobjects
-
equals
-
hashCode
public int hashCode() -
iterator
- Specified by:
iteratorin interfaceIterable<ParametersElement>
-