p3j.pppm.parameters
Class ParameterInstance

java.lang.Object
  extended by p3j.pppm.parameters.ParameterInstance
All Implemented Interfaces:
Serializable

public class ParameterInstance
extends Object
implements Serializable

Represents a parameter instance for the PPPM. This 'instantiates' a Parameter (which might be generation dependent) for a certain generation. Apart from that, this class also defines a comparison index, which is mostly defined for interaction with the user. For example, all parameter instances regarding the second generation of emigrants should be shown in the GUI before the parameters of the third generation of emigrants, and so on. Created on August 7, 2006

Author:
Christina Bohk, Roland Ewald
See Also:
Serialized Form

Constructor Summary
ParameterInstance()
          Constructor for bean compatibility.
ParameterInstance(int cIndex, Parameter param)
          Constructor for general parameters.
ParameterInstance(int cIndex, Parameter param, int gen)
          Default constructor.
 
Method Summary
 Matrix2D createEmptyValue()
          Creates empty matrix with the dimensions as specified by this parameter instance.
 int getComparisonIndex()
           
 int getGeneration()
           
 int getID()
           
 Parameter getParameter()
           
 MatrixDimension getValueHeight()
          Gets the value height.
 MatrixDimension getValueWidth()
          Gets the value width.
 void setComparisonIndex(int comparisonIndex)
           
 void setGeneration(int generation)
           
 void setID(int uniqueID)
           
 void setParameter(Parameter parameter)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParameterInstance

public ParameterInstance(int cIndex,
                         Parameter param,
                         int gen)
Default constructor.

Parameters:
cIndex - the comparison index
param - the parameter that is instantiated
gen - the generation this parameter belongs to

ParameterInstance

public ParameterInstance()
Constructor for bean compatibility.


ParameterInstance

public ParameterInstance(int cIndex,
                         Parameter param)
Constructor for general parameters.

Parameters:
cIndex - the comparison index
param - the parameter that is instantiated
Method Detail

createEmptyValue

public Matrix2D createEmptyValue()
Creates empty matrix with the dimensions as specified by this parameter instance.

Returns:
well-dimensioned empty matrix

toString

public String toString()
Overrides:
toString in class Object

getValueWidth

public MatrixDimension getValueWidth()
Gets the value width.

Returns:
the value width

getValueHeight

public MatrixDimension getValueHeight()
Gets the value height.

Returns:
the value height

getComparisonIndex

public int getComparisonIndex()

setComparisonIndex

public void setComparisonIndex(int comparisonIndex)

getGeneration

public int getGeneration()

setGeneration

public void setGeneration(int generation)

getParameter

public Parameter getParameter()

setParameter

public void setParameter(Parameter parameter)

getID

public int getID()

setID

public void setID(int uniqueID)


Copyright © 2012. All Rights Reserved.