story.dbcore.parameters
Class ParameterSet

java.lang.Object
  extended by story.dbcore.parameters.ParameterSet

public class ParameterSet
extends java.lang.Object

A set of Parameters.

Note that unlike most other classes in dbcore, ParameterSet is meant to be instantiated outside a DBCoreInterface (as opposed to requiring a command to a DBCoreInterface to be created). It does not deal with "real data," only data in the abstract.

Pass one of these on to the DBCoreInterface or a NodeInstancing object to make use of it, e.g., find all nodes or combinations of nodes that satisfy the ParameterSet.


Constructor Summary
ParameterSet()
          Constructor with no initial parameters.
ParameterSet(Parameter param0)
          Constructor with an initial parameter.
ParameterSet(Parameter param0, Parameter param1)
          Constructor with two initial parameters.
ParameterSet(Parameter param0, Parameter param1, Parameter param2)
          Constructor with three initial parameters.
ParameterSet(Parameter param0, Parameter param1, Parameter param2, Parameter param3)
          Constructor with four initial parameters.
ParameterSet(ParameterSet parentSet)
          Constructor for making a ParameterSet that is a nested set inside another ParameterSet.
 
Method Summary
 void addParameter(Parameter parameter)
          Add a parameter.
 void addParameterSet(ParameterSet otherParameters)
          Copy to the end of this ParameterSet all the Parameters from another ParameterSet
 NodeAddressSet assumedNodes()
          Return a list of all the nodes assumed to exist among all the parameters.
 void finalize()
          Finalize this ParameterSet.
 java.util.Enumeration getParameters()
          Get an Enumeration of the Parameters.
 boolean isFinalized()
          Determine whether this ParameterSet is finalized.
 SymbolTable newReferenceTable()
          Create a new SymbolTable with the declarations implied by the ParameterSet's parameters.
 int numParameters()
          Return the number of Parameters in the Set.
 Parameter parameterAt(int index)
          Return a specific Parameter.
 java.lang.StringBuffer render()
          Render the ParameterSet as a StringBuffer suitable for interpretation by the command interpeter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterSet

public ParameterSet()
Constructor with no initial parameters.


ParameterSet

public ParameterSet(ParameterSet parentSet)
             throws Scheherexception
Constructor for making a ParameterSet that is a nested set inside another ParameterSet. The nested set inherits the reference table declarations from the parent set, which means that its references work in the same namespace as the parent's, except that any new references declared here are not pushed up to the "outer scope."

Throws:
Scheherexception

ParameterSet

public ParameterSet(Parameter param0)
             throws Scheherexception
Constructor with an initial parameter.

Throws:
Scheherexception

ParameterSet

public ParameterSet(Parameter param0,
                    Parameter param1)
             throws Scheherexception
Constructor with two initial parameters.

Throws:
Scheherexception

ParameterSet

public ParameterSet(Parameter param0,
                    Parameter param1,
                    Parameter param2)
             throws Scheherexception
Constructor with three initial parameters.

Throws:
Scheherexception

ParameterSet

public ParameterSet(Parameter param0,
                    Parameter param1,
                    Parameter param2,
                    Parameter param3)
             throws Scheherexception
Constructor with four initial parameters.

Throws:
Scheherexception
Method Detail

isFinalized

public boolean isFinalized()
Determine whether this ParameterSet is finalized.


finalize

public void finalize()
Finalize this ParameterSet. Any further attempt to add to it will throw an exception.

Overrides:
finalize in class java.lang.Object

addParameter

public void addParameter(Parameter parameter)
                  throws Scheherexception
Add a parameter.

Throws:
Scheherexception

addParameterSet

public void addParameterSet(ParameterSet otherParameters)
                     throws Scheherexception
Copy to the end of this ParameterSet all the Parameters from another ParameterSet

Throws:
Scheherexception

getParameters

public java.util.Enumeration getParameters()
Get an Enumeration of the Parameters.


newReferenceTable

public SymbolTable newReferenceTable()
Create a new SymbolTable with the declarations implied by the ParameterSet's parameters.


render

public java.lang.StringBuffer render()
                              throws Scheherexception
Render the ParameterSet as a StringBuffer suitable for interpretation by the command interpeter.

Throws:
Scheherexception

numParameters

public int numParameters()
Return the number of Parameters in the Set.


parameterAt

public Parameter parameterAt(int index)
                      throws Scheherexception
Return a specific Parameter.

Throws:
Scheherexception

assumedNodes

public NodeAddressSet assumedNodes()
Return a list of all the nodes assumed to exist among all the parameters.



Copyright © 2011 David K. Elson. All Rights Reserved.