public interface Parameterable extends Cloneable, Serializable
Parameterable
interface is used to indicate a SIP header
field value with optional parameters. All of the Address header fields are
Parameterable, including Contact, From, To, Route, Record-Route, and
Reply-To. In addition, the header fields Accept, Accept-Encoding,
Alert-Info, Call-Info, Content-Disposition, Content-Type, Error-Info,
Retry-After and Via are also Parameterable.Modifier and Type | Method and Description |
---|---|
Object |
clone()
Returns a clone of this
Parameterable . |
boolean |
equals(Object o)
Compares the given Parameterable with this one.
|
String |
getParameter(String key)
Returns the value of the named parameter, or null if it is not
set.
|
Iterator<String> |
getParameterNames()
Returns an
Iterator of the names of all parameters
contained in this object. |
Set<String> |
getParameterNameSet()
Returns an immutable
Set of the names of all parameters
contained in this object. |
Set<Map.Entry<String,String>> |
getParameters()
Returns a Collection view of the parameter name-value mappings
contained in this Parameterable.
|
String |
getValue()
Returns the field value as a string.
|
void |
removeParameter(String name)
Removes the named parameter from this object.
|
void |
setParameter(String name,
String value)
Sets the value of the named parameter.
|
void |
setValue(String value)
Set the value of the field.
|
String getValue()
void setValue(String value)
value
- the new header field value, not including parametersIllegalStateException
- if the header field cannot be modified for this objectNullPointerException
- if the value parameter is nullString getParameter(String key)
String
indicates a flag parameter.key
- a String
specifying the parameter nameNullPointerException
- if key is nullvoid setParameter(String name, String value)
removeParameter(String)
name
- parameter namevalue
- new parameter valueIllegalStateException
- if parameters cannot be modified for this objectNullPointerException
- if name parameter is nullvoid removeParameter(String name)
name
- parameter nameIllegalStateException
- if parameters cannot be modified for this objectNullPointerException
- if name is nullIterator<String> getParameterNames()
Iterator
of the names of all parameters
contained in this object. The order is the order of appearance of the
parameters in the Parameterable.Iterator
of String
objects that
are the names of the parameters contained in this objectSet<String> getParameterNameSet()
Set
of the names of all parameters
contained in this object. The order of elements in the set is the order
of appearance of the parameters in the Parameterable.Set
of String
objects that
are the names of the parameters contained in this objectSet<Map.Entry<String,String>> getParameters()
Set
of Map.Entry
objects that
are the parameters on this Parameterable.Object clone()
Parameterable
. The cloned
Parameterable
has identical field value and parameters.Parameterable
boolean equals(Object o)
As Parameterables consist of a field-value and an optional set of name-value parameters, the following rules should be used for comparing them:
String
comparison should be used.
Copyright © 1996-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.