FreeHEP API
Version v1.2.2

hep.aida.ref.tuple
Class FTupleAdapter

java.lang.Object
  |
  +--hep.aida.ref.tuple.FTupleAdapter
All Implemented Interfaces:
FTuple

public class FTupleAdapter
extends Object
implements FTuple

Author:
The FreeHEP team @ SLAC

Field Summary
 
Fields inherited from interface hep.tuple.interfaces.FTuple
ROWS_UNKNOWN
 
Constructor Summary
FTupleAdapter(hep.aida.ITuple tuple)
           
 
Method Summary
 void close()
          Free any resources associated with the Tuple (open disk files etc)
 FTupleColumn column(int index)
          Get a TupleColumn
 FTupleColumn columnByName(String name)
          Find the index of a column by name
 int columnIndexByName(String name)
          Get the index corresponding to a given column.
 String columnName(int index)
          Get the name of a column from its index
 int columns()
          Get the number of columns in the Tuple
 Class columnType(int index)
          Get the type of a column from its index
 void columnValue(int column, FTupleCursor cursor, Value value)
          Get a value stored in the column.
 FTupleCursor cursor()
          Get a cursor for accessing data from the Tuple.
 boolean isInMemory()
          The purpose of this method is to see if a FTuple would benefit from being buffered in memory for performance issues.
 String name()
          Get the name of the Tuple.
 int rows()
          Get the number of rows in the Tuple
protected  void setTuple(hep.aida.ITuple tuple)
           
 boolean supportsMultipleCursors()
          Determine if this Tuple supports multiple cursors
 boolean supportsRandomAccess()
          Determine if the cursor returned by getCursor allows random access to the data
 String title()
          Get the title of the Tuple.
 FTuple tuple(int index)
          Get Folder at the current cursor position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FTupleAdapter

public FTupleAdapter(hep.aida.ITuple tuple)
Method Detail

close

public void close()
Description copied from interface: FTuple
Free any resources associated with the Tuple (open disk files etc)

Specified by:
close in interface FTuple

column

public FTupleColumn column(int index)
Description copied from interface: FTuple
Get a TupleColumn

Specified by:
column in interface FTuple
Parameters:
index - The index of the column to return
Returns:
The column at index n

columnByName

public FTupleColumn columnByName(String name)
Description copied from interface: FTuple
Find the index of a column by name

Specified by:
columnByName in interface FTuple
Parameters:
name - The name of the column to search for
Returns:
The named column, or null if no column can be found

columnIndexByName

public int columnIndexByName(String name)
Description copied from interface: FTuple
Get the index corresponding to a given column.

Specified by:
columnIndexByName in interface FTuple
Parameters:
name - The column's name.
Returns:
The index of the corresponding column.

columnName

public String columnName(int index)
Description copied from interface: FTuple
Get the name of a column from its index

Specified by:
columnName in interface FTuple
Parameters:
index - The column's index
Returns:
The column's name

columnType

public Class columnType(int index)
Description copied from interface: FTuple
Get the type of a column from its index

Specified by:
columnType in interface FTuple
Parameters:
index - The column's index
Returns:
The column's type

columnValue

public void columnValue(int column,
                        FTupleCursor cursor,
                        Value value)
Description copied from interface: FTuple
Get a value stored in the column.

Specified by:
columnValue in interface FTuple
Parameters:
column - The column's index.
cursor - The cursor that specifies which value to get.
value - The Value object in which the value is passed.

columns

public int columns()
Description copied from interface: FTuple
Get the number of columns in the Tuple

Specified by:
columns in interface FTuple
Returns:
The number of columns

cursor

public FTupleCursor cursor()
                    throws IllegalStateException
Description copied from interface: FTuple
Get a cursor for accessing data from the Tuple. Some Tuples may support mutliple cursors, others may support only single cursor access.

Specified by:
cursor in interface FTuple
Returns:
A Cursor that can be used to access data from the Tuple columns.
IllegalStateException

isInMemory

public boolean isInMemory()
Description copied from interface: FTuple
The purpose of this method is to see if a FTuple would benefit from being buffered in memory for performance issues.

Specified by:
isInMemory in interface FTuple
Returns:
<\true> if the implementer thinks that the performance would improve by buffering the FTuple in memory.

name

public String name()
Description copied from interface: FTuple
Get the name of the Tuple.

Specified by:
name in interface FTuple
Returns:
The name of this Tuple

rows

public int rows()
Description copied from interface: FTuple
Get the number of rows in the Tuple

Specified by:
rows in interface FTuple
Returns:
The number of rows, or ROWS_UNKNOWN if the number of rows cannot be determined

supportsMultipleCursors

public boolean supportsMultipleCursors()
Description copied from interface: FTuple
Determine if this Tuple supports multiple cursors

Specified by:
supportsMultipleCursors in interface FTuple
Returns:
True if multiple cursors are supported

supportsRandomAccess

public boolean supportsRandomAccess()
Description copied from interface: FTuple
Determine if the cursor returned by getCursor allows random access to the data

Specified by:
supportsRandomAccess in interface FTuple
Returns:
True if random access is supported

title

public String title()
Description copied from interface: FTuple
Get the title of the Tuple.

Specified by:
title in interface FTuple
Returns:
The title of this Tuple

tuple

public FTuple tuple(int index)
Description copied from interface: FTuple
Get Folder at the current cursor position.

Specified by:
tuple in interface FTuple
Parameters:
index - The column's index of the Folder.
Returns:
The folder.

setTuple

protected void setTuple(hep.aida.ITuple tuple)

FreeHEP API
Version v1.2.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.