org.grinvin.params

Class ParameterList


public class ParameterList
extends java.lang.Object

Encapsulates a list of parameters, i.e., ParameterInfo-objects and provides methods to create a corresponding list of parameter values.

Constructor Summary

ParameterList()
Construct an empty parameter list.

Method Summary

void
addParameter(ParameterInfo parameter)
Add a parameter at the end of this list.
void
fromElement(Element root)
Add parameters to the end of this list, obtained from descriptions in the given JDOM element.
int
getCount()
Return the total number of parameters.
ParameterInfo
getParameter(int index)
Return information on the parameter with the given index.
Object[]
parseQueryString(String str)
Convert a query-string to a list objects corresponding to this parameter list.
String[]
toText(Object[] values)
Convert the given list of parameter values to their string representations.

Constructor Details

ParameterList

public ParameterList()
Construct an empty parameter list.

Method Details

addParameter

public void addParameter(ParameterInfo parameter)
Add a parameter at the end of this list.

fromElement

public void fromElement(Element root)
            throws IOFormatException
Add parameters to the end of this list, obtained from descriptions in the given JDOM element.

getCount

public int getCount()
Return the total number of parameters.

getParameter

public ParameterInfo getParameter(int index)
Return information on the parameter with the given index.

parseQueryString

public Object[] parseQueryString(String str)
Convert a query-string to a list objects corresponding to this parameter list.

toText

public String[] toText(Object[] values)
Convert the given list of parameter values to their string representations.