Package com.helger.commons.url
Class URLParameter
java.lang.Object
com.helger.commons.url.URLParameter
This class represents a single URL parameter. It consists of a mandatory name
and an optional value.
- Author:
- Philip Helger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendTo(StringBuilder aSB, IEncoder<String, String> aQueryParameterEncoder) booleangetName()getValue()inthashCode()booleanCheck if this parameter has the specified name.booleanhasValue()booleanCheck if this parameter has the specified value.toString()
-
Constructor Details
-
URLParameter
-
URLParameter
-
-
Method Details
-
getName
- Returns:
- The name of the URL parameter. Neither
nullnor empty.
-
hasName
Check if this parameter has the specified name.- Parameters:
sName- The name to check. May benull.- Returns:
trueif name matches,falseotherwise.
-
getValue
- Returns:
- The value of the URL parameter. Never
nullbut maybe empty.
-
hasValue
public boolean hasValue()- Returns:
trueif this parameter has a value,falseotherwise.
-
hasValue
Check if this parameter has the specified value.- Parameters:
sValue- The value to check. May benull.- Returns:
trueif value matches,falseotherwise.
-
appendTo
-
equals
-
hashCode
public int hashCode() -
toString
-