Package ghidra.util.datastruct
Class DataTable
- java.lang.Object
-
- ghidra.util.datastruct.DataTable
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
ManagedDataTable
public class DataTable extends java.lang.Object implements java.io.Serializable
Table for managing rows and columns of data.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DataTable()
Creates a new DataTable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
copyRowTo(int row, DataTable table, int toRow)
Copy one row to another row.boolean
getBoolean(int row, int col)
Returns the boolean at the given row, column.byte
getByte(int row, int col)
Returns the byte at the given row, column.byte[]
getByteArray(int row, int col)
Returns the byte array at the given row, column.double
getDouble(int row, int col)
Returns the double at the given row, column.double[]
getDoubleArray(int row, int col)
Returns the double array at the given row, column.float
getFloat(int row, int col)
Returns the float at the given row, column.float[]
getFloatArray(int row, int col)
Returns the float array at the given row, column.int
getInt(int row, int col)
Returns the int at the given row, column.int[]
getIntArray(int row, int col)
Returns the int array at the given row, column.long
getLong(int row, int col)
Returns the long at the given row, column.long[]
getLongArray(int row, int col)
Returns the long array at the given row, column.java.lang.Object
getObject(int row, int col)
Returns the Object at the given row, column.short
getShort(int row, int col)
Returns the short at the given row, column.short[]
getShortArray(int row, int col)
Returns the short array at the given row, column.java.lang.String
getString(int row, int col)
Returns the string at the given row, column.java.lang.String[]
getStringArray(int row, int col)
Returns the String array at the given row, column.void
putBoolean(int row, int col, boolean value)
Stores a boolean value in the table at the given row and column.void
putByte(int row, int col, byte value)
Stores a byte value in the table at the given row and column.void
putByteArray(int row, int col, byte[] value)
Stores an byte array in the table at the given row and column.void
putDouble(int row, int col, double value)
Stores a double value in the table at the given row and column.void
putDoubleArray(int row, int col, double[] value)
Stores a double array in the table at the given row and column.void
putFloat(int row, int col, float value)
Stores a float value in the table at the given row and column.void
putFloatArray(int row, int col, float[] value)
Stores a float array in the table at the given row and column.void
putInt(int row, int col, int value)
Stores an int value in the table at the given row and column.void
putIntArray(int row, int col, int[] value)
Stores an int array in the table at the given row and column.void
putLong(int row, int col, long value)
Stores a long value in the table at the given row and column.void
putLongArray(int row, int col, long[] value)
Stores an long array in the table at the given row and column.void
putObject(int row, int col, java.lang.Object value)
Stores an Object in the table at the given row and column.void
putShort(int row, int col, short value)
Stores a short value in the table at the given row and column.void
putShortArray(int row, int col, short[] value)
Stores an short array in the table at the given row and column.void
putString(int row, int col, java.lang.String value)
Stores a String in the table at the given row and column.void
putStringArray(int row, int col, java.lang.String[] value)
Stores a String array in the table at the given row and column.void
removeRow(int row)
Removes the given row from the table.
-
-
-
Method Detail
-
removeRow
public void removeRow(int row)
Removes the given row from the table.- Parameters:
row
- The row to be removed
-
copyRowTo
public void copyRowTo(int row, DataTable table, int toRow)
Copy one row to another row.- Parameters:
row
- source rowtable
- table containing the datatoRow
- destination row
-
putBoolean
public void putBoolean(int row, int col, boolean value)
Stores a boolean value in the table at the given row and column. Note - all values in a given column must be of the same type.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)value
- The value to store.
-
getBoolean
public boolean getBoolean(int row, int col)
Returns the boolean at the given row, column.- Parameters:
row
- the row in the tablecol
- the column in the table (field num)- Returns:
- the boolean value in the table
-
putByte
public void putByte(int row, int col, byte value)
Stores a byte value in the table at the given row and column. Note - all values in a given column must be of the same type.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)value
- The value to store.
-
getByte
public byte getByte(int row, int col)
Returns the byte at the given row, column.- Parameters:
row
- the row in the tablecol
- the column in the table (field num)- Returns:
- the byte value in the table
-
putShort
public void putShort(int row, int col, short value)
Stores a short value in the table at the given row and column. Note - all values in a given column must be of the same type.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)value
- The value to store.
-
getShort
public short getShort(int row, int col)
Returns the short at the given row, column.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)- Returns:
- the short value.
-
putInt
public void putInt(int row, int col, int value)
Stores an int value in the table at the given row and column. Note - all values in a given column must be of the same type.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)value
- The value to store.
-
getInt
public int getInt(int row, int col)
Returns the int at the given row, column.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)- Returns:
- the int value.
-
putLong
public void putLong(int row, int col, long value)
Stores a long value in the table at the given row and column. Note - all values in a given column must be of the same type.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)value
- The value to store.
-
putDouble
public void putDouble(int row, int col, double value)
Stores a double value in the table at the given row and column. Note - all values in a given column must be of the same type.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)value
- The value to store.
-
putFloat
public void putFloat(int row, int col, float value)
Stores a float value in the table at the given row and column. Note - all values in a given column must be of the same type.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)value
- The value to store.
-
getLong
public long getLong(int row, int col)
Returns the long at the given row, column.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)- Returns:
- the long value.
-
getFloat
public float getFloat(int row, int col)
Returns the float at the given row, column.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)- Returns:
- the float value.
-
getDouble
public double getDouble(int row, int col)
Returns the double at the given row, column.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)- Returns:
- the double value.
-
putString
public void putString(int row, int col, java.lang.String value)
Stores a String in the table at the given row and column. Note - all values in a given column must be of the same type.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)value
- The value to store.
-
putObject
public void putObject(int row, int col, java.lang.Object value)
Stores an Object in the table at the given row and column. Note - all values in a given column must be of the same type.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)value
- The value to store.
-
getString
public java.lang.String getString(int row, int col)
Returns the string at the given row, column.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)- Returns:
- the int value.
-
getObject
public java.lang.Object getObject(int row, int col)
Returns the Object at the given row, column.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)- Returns:
- the Object value.
-
putByteArray
public void putByteArray(int row, int col, byte[] value)
Stores an byte array in the table at the given row and column. Note - all values in a given column must be of the same type.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)value
- The value to store.
-
getByteArray
public byte[] getByteArray(int row, int col)
Returns the byte array at the given row, column.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)- Returns:
- the int value.
-
putShortArray
public void putShortArray(int row, int col, short[] value)
Stores an short array in the table at the given row and column. Note - all values in a given column must be of the same type.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)value
- The value to store.
-
getShortArray
public short[] getShortArray(int row, int col)
Returns the short array at the given row, column.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)- Returns:
- the int value.
-
putIntArray
public void putIntArray(int row, int col, int[] value)
Stores an int array in the table at the given row and column. Note - all values in a given column must be of the same type.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)value
- The value to store.
-
putFloatArray
public void putFloatArray(int row, int col, float[] value)
Stores a float array in the table at the given row and column. Note - all values in a given column must be of the same type.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)value
- The value to store.
-
putDoubleArray
public void putDoubleArray(int row, int col, double[] value)
Stores a double array in the table at the given row and column. Note - all values in a given column must be of the same type.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)value
- The value to store.
-
getIntArray
public int[] getIntArray(int row, int col)
Returns the int array at the given row, column.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)- Returns:
- the int value.
-
putLongArray
public void putLongArray(int row, int col, long[] value)
Stores an long array in the table at the given row and column. Note - all values in a given column must be of the same type.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)value
- The value to store.
-
getLongArray
public long[] getLongArray(int row, int col)
Returns the long array at the given row, column.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)- Returns:
- the long[] value.
-
getFloatArray
public float[] getFloatArray(int row, int col)
Returns the float array at the given row, column.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)- Returns:
- the float[] value.
-
getDoubleArray
public double[] getDoubleArray(int row, int col)
Returns the double array at the given row, column.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)- Returns:
- the int value.
-
putStringArray
public void putStringArray(int row, int col, java.lang.String[] value)
Stores a String array in the table at the given row and column. Note - all values in a given column must be of the same type.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)value
- The value to store.
-
getStringArray
public java.lang.String[] getStringArray(int row, int col)
Returns the String array at the given row, column.- Parameters:
row
- The row into the table (specifies which object)col
- The column of the table. (specifies which field)- Returns:
- the String[] value.
-
-