at.tuwien.ifs.somtoolbox.reportgenerator.QEContainers
Class InputQEContainer

java.lang.Object
  extended by at.tuwien.ifs.somtoolbox.reportgenerator.QEContainers.InputQEContainer
All Implemented Interfaces:
QEContainer

public class InputQEContainer
extends Object
implements QEContainer

Version:
$Id: InputQEContainer.java 3883 2010-11-02 17:13:23Z frank $
Author:
Sebastian Skritek (0226286, Sebastian.Skritek@gmx.at)

Field Summary
private  Vector<InputDatum> inputs
           
private  double qe
           
private  Vector<Unit> units
           
 
Constructor Summary
InputQEContainer()
           
 
Method Summary
 void addInput(InputDatum input)
          add a new input datum to the container
 void addMapUnit(Unit unit)
          adds a unit to this container
 void clearInputs()
          removes all inputs stored in this container
 void clearMapUnits()
          removes all units from the list
 InputDatum getInput(int i)
          return the input datum at the specified index
 String getInputLabel(int index)
          returns the label for the input at the given index
 Unit getMapUnit(int i)
          returns the unit at the specified index
 int getNumInputs()
          the number of input items having the qe stored by this object
 double getQE()
          return the quantization error, this container stores
 String getUnitCoords(int index)
          returns a string of format x-coord x y-coord of the unit at the specified index
 void setInputs(Vector<InputDatum> inputs)
          set the complete list of input data stored in this container (existing items are overridden)
 void setMapUnits(Vector<Unit> units)
          sets the complete list of units stored in this container.
 void setQE(double qe)
          sets the qe of this container to the given value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

qe

private double qe

inputs

private Vector<InputDatum> inputs

units

private Vector<Unit> units
Constructor Detail

InputQEContainer

public InputQEContainer()
Method Detail

addInput

public void addInput(InputDatum input)
add a new input datum to the container


setInputs

public void setInputs(Vector<InputDatum> inputs)
set the complete list of input data stored in this container (existing items are overridden)


clearInputs

public void clearInputs()
removes all inputs stored in this container


getInput

public InputDatum getInput(int i)
return the input datum at the specified index

Parameters:
i - the index from which the index datum shall be returned. Not checked whether there exits one ... so watch out
Returns:
the input datum at the specified index

addMapUnit

public void addMapUnit(Unit unit)
adds a unit to this container

Parameters:
unit - the unit to add

setMapUnits

public void setMapUnits(Vector<Unit> units)
sets the complete list of units stored in this container. Old list is overridden

Parameters:
units - the list of units to store

clearMapUnits

public void clearMapUnits()
removes all units from the list


getMapUnit

public Unit getMapUnit(int i)
returns the unit at the specified index

Parameters:
i - the index of the unit to return (is not checked whether this index exists - watch out)
Returns:
the unit at the specified index

getQE

public double getQE()
return the quantization error, this container stores

Specified by:
getQE in interface QEContainer
Returns:
the qe stored

setQE

public void setQE(double qe)
sets the qe of this container to the given value

Specified by:
setQE in interface QEContainer
Parameters:
qe - the qe to be storec

getNumInputs

public int getNumInputs()
the number of input items having the qe stored by this object

Returns:
the number of input items having this qe

getUnitCoords

public String getUnitCoords(int index)
returns a string of format x-coord x y-coord of the unit at the specified index

Parameters:
index - the index of the unit in the list of units stored in this object
Returns:
a string formatted as described above

getInputLabel

public String getInputLabel(int index)
returns the label for the input at the given index

Parameters:
index - the index of the label in the list of labels hold by this object
Returns:
the label of the input at the specified index