|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.openforecast.input.AbstractBuilder
public abstract class AbstractBuilder
Defines an abstract Builder class that provides some common functionality and helper methods for use by sub-classes.
Constructor Summary | |
---|---|
AbstractBuilder()
|
Method Summary | |
---|---|
protected void |
addVariable(String name)
Adds the variable name to the end of the list of variables currently defined for this Builder. |
protected int |
getNumberOfVariables()
Returns the number of variables currently defined in this AbstractBuilder. |
protected String |
getVariableName(int index)
Returns the variable name with the given index. |
protected void |
setNumberOfVariables(int n)
Sets the number of variables to be defined/referenced by this AbstractBuilder. |
protected void |
setVariableName(int index,
String name)
Sets the name for the variable with the given index to the given name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sourceforge.openforecast.input.Builder |
---|
build |
Constructor Detail |
---|
public AbstractBuilder()
Method Detail |
---|
protected void addVariable(String name)
name
- the name of the new variable.protected void setVariableName(int index, String name)
index
- the index of the variable whose name to set.name
- the name of the given variable.protected int getNumberOfVariables()
protected void setNumberOfVariables(int n)
n
- the number of variables to be defined.protected String getVariableName(int index)
If no variable names have been defined, then it is assumed that the
"default" names, xi, should be used. In this case, an
exception will only be thrown if the index number requested exceeds
the number of variables set using a previous call to
setNumberOfVariables(int)
.
index
- the index of the variable whose name to get.
IndexOutOfBoundsException
- if one or more variable names have
been specified, but not one with the given index; or the number of
variables has been defined (with no variable names being specified)
and the index exceeds the number of variables defined.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |