citysdk.tourism.client.requests
Class ParameterList

java.lang.Object
  extended by citysdk.tourism.client.requests.ParameterList

public class ParameterList
extends java.lang.Object

A list of Parameter used for the TourismClient stub when performing HTTP requests.

Author:
Pedro Cruz

Constructor Summary
ParameterList()
          Initializes an empty list of Parameter.
 
Method Summary
 void add(Parameter parameter)
          Adds a new parameter, if it does not exist already.
 Parameter get(int i)
          Gets the Parameter in the given index.
 Parameter getWithTerm(ParameterTerms term)
          Gets the Parameter with the given term.
 void removeAll()
          Removes all Parameter.
 void replace(Parameter parameter)
          Replaces or adds a given Parameter.
 int size()
          Gets the number of parameters in the parameter list.
 Parameter[] toArray()
          Get the array representation of the parameters.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterList

public ParameterList()
Initializes an empty list of Parameter.

Method Detail

add

public void add(Parameter parameter)
Adds a new parameter, if it does not exist already.

Parameters:
parameter - Parameter to be added.

get

public Parameter get(int i)
Gets the Parameter in the given index.

Parameters:
i - index of the Parameter.
Returns:
Parameter in index i or null.

getWithTerm

public Parameter getWithTerm(ParameterTerms term)
Gets the Parameter with the given term.

Parameters:
term - the term of the Parameter.
Returns:
Parameter with the given term or null.

replace

public void replace(Parameter parameter)
Replaces or adds a given Parameter.

Parameters:
parameter - the Parameter to be replaced/added.

removeAll

public void removeAll()
Removes all Parameter.


size

public int size()
Gets the number of parameters in the parameter list.

Returns:
the number of parameters.

toArray

public Parameter[] toArray()
Get the array representation of the parameters.

Returns:
an array of parameters.