public class ParameterList extends Object implements Serializable, Iterable<Parameter>
Constructor and Description |
---|
ParameterList()
Default constructor.
|
ParameterList(boolean unmodifiable)
Constructor.
|
ParameterList(ParameterList list,
boolean unmodifiable)
Creates a deep copy of the specified parameter list.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(Parameter parameter)
Add a parameter to the list.
|
boolean |
equals(Object arg0) |
<T extends Parameter> |
getParameter(String aName)
Returns the first parameter with the specified name.
|
ParameterList |
getParameters(String name)
Returns a list of parameters with the specified name.
|
int |
hashCode() |
boolean |
isEmpty() |
Iterator<Parameter> |
iterator() |
boolean |
remove(Parameter parameter)
Remove a parameter from the list.
|
void |
removeAll(String paramName)
Remove all parameters with the specified name.
|
boolean |
replace(Parameter parameter)
Replace any parameters of the same type with the one specified.
|
int |
size() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public ParameterList()
public ParameterList(boolean unmodifiable)
unmodifiable
- indicates whether the list should be mutablepublic ParameterList(ParameterList list, boolean unmodifiable)
list
- a parameter list to copy parameters fromunmodifiable
- indicates whether the list should be mutableURISyntaxException
- where a parameter in the list specifies an invalid URI valuepublic final <T extends Parameter> Optional<T> getParameter(String aName)
aName
- name of the parameterpublic final ParameterList getParameters(String name)
name
- name of parameters to returnpublic final boolean add(Parameter parameter)
parameter
- the parameter to addList.add(java.lang.Object)
public final boolean replace(Parameter parameter)
parameter
- parameter to add to this list in place of all others with the same namepublic final boolean isEmpty()
List.isEmpty()
public final Iterator<Parameter> iterator()
iterator
in interface Iterable<Parameter>
List.iterator()
public final boolean remove(Parameter parameter)
parameter
- the parameter to removeList.remove(java.lang.Object)
public final void removeAll(String paramName)
paramName
- the name of parameters to removepublic final int size()
List.size()