pt.digitalis.dif.dem.objects.parameters
Class ParameterList

java.lang.Object
  extended by pt.digitalis.dif.dem.objects.parameters.ParameterList

public class ParameterList
extends Object

A list of parameters

Author:
Pedro Viegas pviegas@digitalis.pt
Created on:
Nov 22, 2007

Constructor Summary
ParameterList()
           
 
Method Summary
 void addParameter(IParameter<?> parameter)
          Adds a parameter to the list
 ParameterList addParameters(ParameterList list)
          Adds a parameter list to the current one
 ParameterList cloneMe()
          Creates a new instance of the current object
 IParameter<?> getParameter(String id)
          Gets a parameter by it's id
<T> IParameter<T>
getParameter(String id, Class<T> clazz)
          Gets a parameter by it's id
 Map<String,IParameter> getParameters()
           
 void updatesParameter(IParameter parameter)
          Updates a parameter in the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterList

public ParameterList()
Method Detail

addParameter

public void addParameter(IParameter<?> parameter)
Adds a parameter to the list

Parameters:
parameter - the parameter to add

addParameters

public ParameterList addParameters(ParameterList list)
Adds a parameter list to the current one

Parameters:
list - the parameter list to add
Returns:
the object with the new list added

cloneMe

public ParameterList cloneMe()
                      throws CloneNotSupportedException
Creates a new instance of the current object

Returns:
ParameterList clone
Throws:
CloneNotSupportedException

getParameter

public IParameter<?> getParameter(String id)
Gets a parameter by it's id

Parameters:
id - the id to search
Returns:
the parameter

getParameter

public <T> IParameter<T> getParameter(String id,
                                      Class<T> clazz)
Gets a parameter by it's id

Type Parameters:
T - the type of the parameter
Parameters:
id - the id to search
clazz - the class of the parameter
Returns:
the parameter

getParameters

public Map<String,IParameter> getParameters()
Returns:
the parameters

updatesParameter

public void updatesParameter(IParameter parameter)
                      throws ParameterException
Updates a parameter in the list. If it does not exist it is added to the list

Parameters:
parameter - the parameter to update
Throws:
ParameterException - if the parameter cannot be updated


Copyright © 2014 Digitalis Informática Lda. All Rights Reserved.