net.fortuna.ical4j.model
Class ParameterList
java.lang.Object
net.fortuna.ical4j.model.ParameterList
- Serializable
public class ParameterList
extends java.lang.Object
implements Serializable
$Id: ParameterList.java,v 1.18 2008/12/16 12:34:53 fortuna Exp $ [Apr 5, 2004]
Defines a list of iCalendar parameters. A parameter list may be specified as unmodifiable at instantiation - useful
for constant properties that you don't want modified.
boolean | add(Parameter parameter) - Add a parameter to the list.
|
boolean | equals(Object arg0) - Uses
ObjectUtils to test equality.
|
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() - Uses
HashCodeBuilder to build hashcode.
|
boolean | isEmpty()
|
Iterator | 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()
|
ParameterList
public ParameterList()
Default constructor. Creates a modifiable parameter list.
ParameterList
public ParameterList(ParameterList list,
boolean unmodifiable)
throws URISyntaxException
Creates a deep copy of the specified parameter list. That is, copies of all parameters in the specified list are
added to this list.
list
- a parameter list to copy parameters from
ParameterList
public ParameterList(boolean unmodifiable)
Constructor.
add
public final boolean add(Parameter parameter)
Add a parameter to the list. Note that this method will not remove existing parameters of the same type. To
achieve this use {
}
parameter
- the parameter to add
List.add(java.lang.Object)
equals
public final boolean equals(Object arg0)
Uses ObjectUtils
to test equality. Two parameter lists are equals if and only if they contain the same
set of parameters.
java.lang.Object.equals(java.lang.Object)
getParameter
public final Parameter getParameter(String aName)
Returns the first parameter with the specified name.
aName
- name of the parameter
- the first matching parameter or null if no matching parameters
getParameters
public final ParameterList getParameters(String name)
Returns a list of parameters with the specified name.
name
- name of parameters to return
hashCode
public final int hashCode()
Uses HashCodeBuilder
to build hashcode.
isEmpty
public final boolean isEmpty()
- boolean indicates if the list is empty
iterator
public final Iterator iterator()
remove
public final boolean remove(Parameter parameter)
Remove a parameter from the list.
parameter
- the parameter to remove
- true if the list contained the specified parameter
List.remove(java.lang.Object)
removeAll
public final void removeAll(String paramName)
Remove all parameters with the specified name.
replace
public final boolean replace(Parameter parameter)
Replace any parameters of the same type with the one specified.
parameter
- parameter to add to this list in place of all others with the same name
- true if successfully added to this list
size
public final int size()
- the number of parameters in the list
toString
public final String toString()
java.util.AbstractCollection.toString()