prefuse.data.column
Class LongColumn

java.lang.Object
  extended by prefuse.data.column.AbstractColumn
      extended by prefuse.data.column.LongColumn
All Implemented Interfaces:
Column

public class LongColumn
extends AbstractColumn

Column implementation for storing long values.

Author:
jeffrey heer

Field Summary
 
Fields inherited from class prefuse.data.column.AbstractColumn
m_columnType, m_defaultValue, m_listeners, m_parser, m_readOnly
 
Constructor Summary
LongColumn()
          Create a new empty LongColumn.
LongColumn(int nrows)
          Create a new LongColumn.
LongColumn(int nrows, int capacity, long defaultValue)
          Create a new LongColumn.
 
Method Summary
 java.lang.Object get(int row)
          Get the data value at the specified row
 double getDouble(int row)
          Get the data value at the specified row as a double
 float getFloat(int row)
          Get the data value at the specified row as a float
 int getInt(int row)
          Get the data value at the specified row as an integer
 long getLong(int row)
          Get the data value at the specified row as a long
 int getRowCount()
          Returns the number of rows in this data column
 void set(java.lang.Object val, int row)
          Set the data value at the specified row
 void setLong(long val, int row)
          Set the data value at the specified row as a long
 void setMaximumRow(int nrows)
          Sets the number of rows in this data column
 
Methods inherited from class prefuse.data.column.AbstractColumn
addColumnListener, canGet, canGetBoolean, canGetDate, canGetDouble, canGetFloat, canGetInt, canGetLong, canGetString, canSet, canSetBoolean, canSetDate, canSetDouble, canSetFloat, canSetInt, canSetLong, canSetString, fireColumnEvent, fireColumnEvent, fireColumnEvent, fireColumnEvent, fireColumnEvent, fireColumnEvent, fireColumnEvent, getBoolean, getColumnType, getDate, getDefaultValue, getParser, getString, isCellEditable, isReadOnly, removeColumnListener, revertToDefault, setBoolean, setDate, setDefaultValue, setDouble, setFloat, setInt, setParser, setReadOnly, setString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LongColumn

public LongColumn()
Create a new empty LongColumn.


LongColumn

public LongColumn(int nrows)
Create a new LongColumn.

Parameters:
nrows - the initial size of the column

LongColumn

public LongColumn(int nrows,
                  int capacity,
                  long defaultValue)
Create a new LongColumn.

Parameters:
nrows - the initial size of the column
capacity - the initial capacity of the column
defaultValue - the default value for the column
Method Detail

getRowCount

public int getRowCount()
Description copied from interface: Column
Returns the number of rows in this data column

Returns:
the number of rows
See Also:
Column.getRowCount()

setMaximumRow

public void setMaximumRow(int nrows)
Description copied from interface: Column
Sets the number of rows in this data column

Parameters:
nrows - the number of rows
See Also:
Column.setMaximumRow(int)

get

public java.lang.Object get(int row)
Description copied from interface: Column
Get the data value at the specified row

Parameters:
row - the row from which to retrieve the value
Returns:
the data value
See Also:
Column.get(int)

set

public void set(java.lang.Object val,
                int row)
         throws DataTypeException
Description copied from interface: Column
Set the data value at the specified row

Parameters:
val - the value to set
row - the row at which to set the value
Throws:
DataTypeException
See Also:
Column.set(java.lang.Object, int)

getLong

public long getLong(int row)
             throws DataTypeException
Description copied from class: AbstractColumn
Get the data value at the specified row as a long

Specified by:
getLong in interface Column
Overrides:
getLong in class AbstractColumn
Parameters:
row - the row from which to retrieve the value
Returns:
the data value as a long
Throws:
DataTypeException - if this column does not support the long type
See Also:
AbstractColumn.getLong(int)

setLong

public void setLong(long val,
                    int row)
             throws DataTypeException
Description copied from class: AbstractColumn
Set the data value at the specified row as a long

Specified by:
setLong in interface Column
Overrides:
setLong in class AbstractColumn
Parameters:
val - the value to set
row - the row at which to set the value
Throws:
DataTypeException - if this column does not support the long type
See Also:
AbstractColumn.setLong(long, int)

getInt

public int getInt(int row)
           throws DataTypeException
Description copied from class: AbstractColumn
Get the data value at the specified row as an integer

Specified by:
getInt in interface Column
Overrides:
getInt in class AbstractColumn
Parameters:
row - the row from which to retrieve the value
Returns:
the data value as an integer
Throws:
DataTypeException - if this column does not support the integer type
See Also:
Column.getInt(int)

getFloat

public float getFloat(int row)
               throws DataTypeException
Description copied from class: AbstractColumn
Get the data value at the specified row as a float

Specified by:
getFloat in interface Column
Overrides:
getFloat in class AbstractColumn
Parameters:
row - the row from which to retrieve the value
Returns:
the data value as a float
Throws:
DataTypeException - if this column does not support the float type
See Also:
Column.getFloat(int)

getDouble

public double getDouble(int row)
                 throws DataTypeException
Description copied from class: AbstractColumn
Get the data value at the specified row as a double

Specified by:
getDouble in interface Column
Overrides:
getDouble in class AbstractColumn
Parameters:
row - the row from which to retrieve the value
Returns:
the data value as a double
Throws:
DataTypeException - if this column does not support the double type
See Also:
Column.getDouble(int)


Copyright © 2007 Regents of the University of California