|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.could.util.location.Parameters.Parameter
The Parameter
class represents a single
parameter either parsed from a query string or a path element.
Field Summary |
Fields inherited from interface it.could.util.encoding.EncodingAware |
DEFAULT_ENCODING, PLATFORM_ENCODING |
Constructor Summary | |
Parameters.Parameter(String name,
String value)
Create a new Parameter given an
encoded parameter name and value. |
Method Summary | |
boolean |
equals(Object object)
Check if the specified Object is equal to this
Parameter instance. |
String |
getName()
Return the URL-decoded name of this Parameter instance. |
String |
getValue()
Return the URL-decoded value of this Parameter instance. |
int |
hashCode()
Return the hash code value for this Parameter instance. |
static Parameters.Parameter |
parse(String parameter)
Parse the specified parameters String into a
Parameters.Parameter instance. |
static Parameters.Parameter |
parse(String parameter,
String encoding)
Parse the specified parameters String into a
Parameters.Parameter instance. |
String |
toString()
Return the URL-encoded String representation of this
Parameter instance. |
String |
toString(String encoding)
Return the URL-encoded String representation of this
Parameter instance using the specified
character encoding. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Parameters.Parameter(String name, String value)
Create a new Parameter
given an
encoded parameter name and value.
NullPointerException
- if the name was null.
IllegalArgumentException
- if the name was an empty string.Method Detail |
public static Parameters.Parameter parse(String parameter) throws UnsupportedEncodingException
Parse the specified parameters String
into a
Parameters.Parameter
instance.
Parameters.Parameter
instance or null if the specified string was
null or empty.
UnsupportedEncodingException
public static Parameters.Parameter parse(String parameter, String encoding) throws UnsupportedEncodingException
Parse the specified parameters String
into a
Parameters.Parameter
instance.
Parameters.Parameter
instance or null if the specified string was
null or empty.
UnsupportedEncodingException
public String getName()
Return the URL-decoded name of this
Parameter
instance.
public String getValue()
Return the URL-decoded value of this
Parameter
instance.
public String toString()
Return the URL-encoded String
representation of this
Parameter
instance.
toString
in interface Encodable
public String toString(String encoding) throws UnsupportedEncodingException
Return the URL-encoded String
representation of this
Parameter
instance using the specified
character encoding.
toString
in interface Encodable
UnsupportedEncodingException
- if the specified encoding is not
supported by the platform.public int hashCode()
Return the hash code value for this
Parameter
instance.
public boolean equals(Object object)
Check if the specified Object
is equal to this
Parameter
instance.
The specified Object
is considered equal to this one if
it is non-null, it is a Parameter
instance, and its string representation
equals
this one's.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |