EspressChart
v 5.5

quadbase.common.param
Class ParameterSet

java.lang.Object
  |
  +--quadbase.common.param.ParameterSet
All Implemented Interfaces:
Parameters

public class ParameterSet
extends java.lang.Object
implements Parameters

This class implements Parameters. It supports add and get methods for Param type objects. Once added, a Param object cannot be removed from this ParameterSet. Internally, a Vector stores all the Param and a Hashtable holds pointers to these Param objects for fast retrieval when specific get methods is used.


Constructor Summary
ParameterSet()
          Allocates an empty ParameterSet
 
Method Summary
 boolean add(Param p)
           
 Param get(int index)
          Gets a particular Param by index.
 Parameters get(java.lang.String name)
          Gets a set of parameters by its name.
 Param get(java.lang.String parent, java.lang.String name, boolean isFormula)
          Gets a Param by its parent name and name.
 int size()
          the total number of parameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterSet

public ParameterSet()
Allocates an empty ParameterSet
Method Detail

size

public int size()
the total number of parameters
Specified by:
size in interface Parameters

add

public boolean add(Param p)

get

public Param get(int index)
Gets a particular Param by index.
Specified by:
get in interface Parameters
Parameters:
index - 0 <= index < size()

get

public Param get(java.lang.String parent,
                 java.lang.String name,
                 boolean isFormula)
Gets a Param by its parent name and name. Both must not be null.. Returns null if the matching Param is not found.
Specified by:
get in interface Parameters
Parameters:
parent - the name of the template that contains this parameter. This may either be the name of a report, or the name of a sub report, etc.
name - the name of the parameter

get

public Parameters get(java.lang.String name)
Gets a set of parameters by its name. Note that this returns a set of parameters (Params) because parameter name does not have to be unique across templates (between main report and sub report, between two sub reports, etc.). Returns null if the matching Param is not found.
Specified by:
get in interface Parameters
Parameters:
name - the name of the parameter

EspressChart
v 5.5