spis.Util.Table
Class Table

java.lang.Object
  extended byspis.Util.Table.Table
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ScalTable, VectTable

public abstract class Table
extends java.lang.Object
implements java.io.Serializable

Class Name : Table
Project ref : SPIS project
File name : Table.java
File type : class
Copyright : ONERA, 2 Av. E. Belin, 31055 Toulouse cedex, France http://www.onecert.fr
Status : under development
Creation : 25/08/2003
Modification :

Description : Table of values (i.e. 1 column), of variable type, typically scalars or vectors.
Predefined containers, such as lists of generic objects in C++ STL, were not used for efficiency reasons.
All Table classes must be derived from this class.
Versions and anomalies correction :

Version numberAuthor (name, e-mail) Corrections/Modifications
0.1 JF Roussel, roussel@onecert.frCreation


Version:
0.1
Author:
JF Roussel
See Also:
Serialized Form

Field Summary
protected  int dim
          logical dimension of the table (if stored as an array it is the size of the table effectively filled (which may be less than the the array size), if it is stored as a uniform constant, it is the size of the table it represents
protected static int increment
          increment step when tables must be enlarged
 
Constructor Summary
Table(int dimension)
          Default constructor
 
Method Summary
 void checkSameDim(Table tab)
          checks equality of table dimension (logical filled dimension, not allocated length)
 void declareDim(int dimension)
          declares the table dimension (logical filled dimension, not allocated length) (does not actually resize any array)
 int getDim()
          provides table dimension (logical filled dimension, not allocated length)
abstract  void reset()
          Sets this table to zero value (dimension, etc. unchanged)
abstract  void setDim(int dim)
          Sets logical dimension to dim and resizes the table if necessary to be large enough (does not preserve data (except if no resizing is needed))
abstract  void setDimPreserve(int dim)
          Sets logical dimension to dim and resizes the table if necessary to be large enough, preserving the data
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

increment

protected static final int increment
increment step when tables must be enlarged

See Also:
Constant Field Values

dim

protected int dim
logical dimension of the table (if stored as an array it is the size of the table effectively filled (which may be less than the the array size), if it is stored as a uniform constant, it is the size of the table it represents

Constructor Detail

Table

public Table(int dimension)
Default constructor

Method Detail

setDim

public abstract void setDim(int dim)
Sets logical dimension to dim and resizes the table if necessary to be large enough (does not preserve data (except if no resizing is needed))


setDimPreserve

public abstract void setDimPreserve(int dim)
Sets logical dimension to dim and resizes the table if necessary to be large enough, preserving the data


declareDim

public void declareDim(int dimension)
declares the table dimension (logical filled dimension, not allocated length) (does not actually resize any array)


getDim

public int getDim()
provides table dimension (logical filled dimension, not allocated length)


checkSameDim

public void checkSameDim(Table tab)
checks equality of table dimension (logical filled dimension, not allocated length)


reset

public abstract void reset()
Sets this table to zero value (dimension, etc. unchanged)