- java.lang.Object
-
- net.sourceforge.urin.scheme.http.HttpQuery.QueryParameter
-
- Enclosing class:
- HttpQuery
public abstract static class HttpQuery.QueryParameter extends java.lang.Object
Value type for specifying HTTP query parameter name/value pairs.- See Also:
HttpQuery.queryParameter(String, String)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract boolean
hasValue()
Returns true ifvalue()
can be called on thisQueryParameter
.abstract java.lang.String
name()
Gets the (non-encoded) name of this query parameter as aString
.abstract java.lang.String
value()
Gets the value component of thisQueryParameter
, as aString
, if it has one, or throwsUnsupportedOperationException
otherwise.
-
-
-
Method Detail
-
name
public abstract java.lang.String name()
Gets the (non-encoded) name of this query parameter as aString
.- Returns:
- the (non-encoded) name of this query parameter as a
String
.
-
hasValue
public abstract boolean hasValue()
Returns true ifvalue()
can be called on thisQueryParameter
. This method returns false forQueryParameter
s that do not have a value component.- Returns:
- true if
value()
can be called on thisQueryParameter
.
-
value
public abstract java.lang.String value()
Gets the value component of thisQueryParameter
, as aString
, if it has one, or throwsUnsupportedOperationException
otherwise.The existence of a value component can be tested by calling
hasValue()
.- Returns:
- the value component of this
QueryParameter
. - Throws:
java.lang.UnsupportedOperationException
- if this is aQueryParameter
that does not have a value component.
-
-