Interface DataBank
- All Known Implementing Classes:
BasicDataBank
,EvioDataBank
,HipoDataBank
public interface DataBank
-
Method Summary
Modifier and TypeMethodDescriptionvoid
allocate
(int rows) Allocates all variables for the the bank. the names are taken from the descriptor object.void
appendByte
(String path, byte[] arr) void
appendDouble
(String path, double[] arr) Appends an array to existing array with the same name.void
appendFloat
(String path, float[] arr) void
void
appendLong
(String path, long[] arr) void
appendShort
(String path, short[] arr) int
columns()
Returns the number of columns in the bank. columns are number of variables.byte
getByte
(int element, int index) byte[]
byte
String[]
Get the names of the columns in the bank.Returns the descriptor of the bank, that contains names of the variables and their types.double
getDouble
(int element, int index) double[]
Returns a native array of doubles for given name.double
float
getFloat
(int element, int index) float[]
float
int
getInt
(int element, int index) int[]
int
long
getLong
(int element, int index) long[]
long
short
getShort
(int element, int index) short[]
short
getTableModel
(String mask) Returns a table model for displaying the bank informationvoid
reset()
Clears the content of the bank. all columns are removed.int
rows()
returns the number of rows in the bank, assuming all columns have the same length.void
setByte
(int element, int row, byte value) void
void
void
setDouble
(int element, int row, double value) void
Adds array of doubles into the bank under the name.void
void
setFloat
(int element, int row, float value) void
void
void
setInt
(int element, int row, int value) void
void
void
setLong
(int element, int row, long value) void
void
void
setShort
(int element, int row, short value) void
void
void
show()
Prints the content of the bank on the screen.
-
Method Details
-
getColumnList
String[] getColumnList()Get the names of the columns in the bank. The name is used in the calls getInt() and getDouble() and other calls for get the arrays.- Returns:
- array of strings with names.
-
getDescriptor
DataDescriptor getDescriptor()Returns the descriptor of the bank, that contains names of the variables and their types.- Returns:
- bank descriptor
-
getDouble
Returns a native array of doubles for given name.- Parameters:
path
- - name of the column.- Returns:
- double[] array with values.
-
getDouble
-
getDouble
double getDouble(int element, int index) -
setDouble
Adds array of doubles into the bank under the name.- Parameters:
path
- - name of the array.arr
- primitive type array of doubles.
-
setDouble
-
setDouble
void setDouble(int element, int row, double value) -
appendDouble
Appends an array to existing array with the same name. The resulting array will increase in size by arr.length.- Parameters:
path
- name of the variablearr
- primitive type array of doubles.
-
getFloat
-
getFloat
-
getFloat
float getFloat(int element, int index) -
setFloat
-
setFloat
-
setFloat
void setFloat(int element, int row, float value) -
appendFloat
-
getInt
-
getInt
-
getInt
int getInt(int element, int index) -
setInt
-
setInt
-
setInt
void setInt(int element, int row, int value) -
appendInt
-
getShort
-
getShort
-
getShort
short getShort(int element, int index) -
setShort
-
setShort
-
setShort
void setShort(int element, int row, short value) -
appendShort
-
getByte
-
getByte
-
getByte
byte getByte(int element, int index) -
setByte
-
setByte
-
setByte
void setByte(int element, int row, byte value) -
appendByte
-
getLong
-
getLong
-
getLong
long getLong(int element, int index) -
setLong
-
setLong
-
setLong
void setLong(int element, int row, long value) -
appendLong
-
columns
int columns()Returns the number of columns in the bank. columns are number of variables.- Returns:
- number of columns
-
rows
int rows()returns the number of rows in the bank, assuming all columns have the same length.- Returns:
- number of rows
-
show
void show()Prints the content of the bank on the screen. The implementation of printout is left up to the particular implementation of the class. -
reset
void reset()Clears the content of the bank. all columns are removed. -
allocate
void allocate(int rows) Allocates all variables for the the bank. the names are taken from the descriptor object.- Parameters:
rows
- number of rows for each column to allocate
-
getTableModel
Returns a table model for displaying the bank information- Parameters:
mask
-- Returns:
-