Package org.jlab.io.bos
Class BosDataBank
java.lang.Object
org.jlab.io.bos.BosDataBank
- All Implemented Interfaces:
DataBank
- Author:
- gavalian
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidallocate(int rows) Allocates all variables for the the bank. the names are taken from the descriptor object.voidappendByte(String path, byte[] arr) voidappendDouble(String path, double[] arr) Appends an array to existing array with the same name.voidappendFloat(String path, float[] arr) voidvoidappendLong(String path, long[] arr) voidappendShort(String path, short[] arr) intcolumns()Returns the number of columns in the bank. columns are number of variables.byte[]byteString[]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[]Returns a native array of doubles for given name.doublefloat[]floatint[]intlong[]longshort[]shortgetTableModel(String mask) Returns a table model for displaying the bank informationvoidreset()Clears the content of the bank. all columns are removed.introws()returns the number of rows in the bank, assuming all columns have the same length.voidvoidvoidAdds array of doubles into the bank under the name.voidvoidvoidvoidvoidvoidvoidvoidvoidvoidshow()Prints the content of the bank on the screen.
-
Constructor Details
-
BosDataBank
-
-
Method Details
-
getColumnList
Description copied from interface:DataBankGet 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.- Specified by:
getColumnListin interfaceDataBank- Returns:
- array of strings with names.
-
getDescriptor
Description copied from interface:DataBankReturns the descriptor of the bank, that contains names of the variables and their types.- Specified by:
getDescriptorin interfaceDataBank- Returns:
- bank descriptor
-
getDouble
Description copied from interface:DataBankReturns a native array of doubles for given name. -
setDouble
Description copied from interface:DataBankAdds array of doubles into the bank under the name. -
appendDouble
Description copied from interface:DataBankAppends an array to existing array with the same name. The resulting array will increase in size by arr.length.- Specified by:
appendDoublein interfaceDataBank- Parameters:
path- name of the variablearr- primitive type array of doubles.
-
getFloat
-
setFloat
-
appendFloat
- Specified by:
appendFloatin interfaceDataBank
-
getInt
-
setInt
-
appendInt
-
getShort
-
setShort
-
appendShort
- Specified by:
appendShortin interfaceDataBank
-
getLong
-
setLong
-
appendLong
- Specified by:
appendLongin interfaceDataBank
-
show
public void show()Description copied from interface:DataBankPrints the content of the bank on the screen. The implementation of printout is left up to the particular implementation of the class. -
columns
public int columns()Description copied from interface:DataBankReturns the number of columns in the bank. columns are number of variables. -
rows
public int rows()Description copied from interface:DataBankreturns the number of rows in the bank, assuming all columns have the same length. -
getByte
-
setByte
-
appendByte
- Specified by:
appendBytein interfaceDataBank
-
setDouble
-
setFloat
-
setInt
-
setShort
-
setByte
-
setLong
-
reset
public void reset()Description copied from interface:DataBankClears the content of the bank. all columns are removed. -
allocate
public void allocate(int rows) Description copied from interface:DataBankAllocates all variables for the the bank. the names are taken from the descriptor object. -
getDouble
-
getFloat
-
getInt
-
getShort
-
getByte
-
getLong
-
getTableModel
Description copied from interface:DataBankReturns a table model for displaying the bank information- Specified by:
getTableModelin interfaceDataBank- Returns:
-