- java.lang.Object
-
- net.sourceforge.urin.scheme.http.HttpQuery.QueryParameter
-
- Enclosing class:
- HttpQuery
public abstract static class HttpQuery.QueryParameter extends java.lang.ObjectValue 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 booleanhasValue()Returns true ifvalue()can be called on thisQueryParameter.abstract java.lang.Stringname()Gets the (non-encoded) name of this query parameter as aString.abstract java.lang.Stringvalue()Gets the value component of thisQueryParameter, as aString, if it has one, or throwsUnsupportedOperationExceptionotherwise.
-
-
-
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 forQueryParameters 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 throwsUnsupportedOperationExceptionotherwise.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 aQueryParameterthat does not have a value component.
-
-