uk.ac.starlink.table
Class EmptyRowSequence

java.lang.Object
  extended by uk.ac.starlink.table.EmptyRowSequence
All Implemented Interfaces:
RowSequence

public class EmptyRowSequence
extends java.lang.Object
implements RowSequence

Row sequence implementation which has no rows. Singleton impelementation.

Since:
28 Oct 2004

Method Summary
 void close()
          Does nothing.
 java.lang.Object getCell(int icol)
          Always throws IllegalStateException.
static EmptyRowSequence getInstance()
          Returns singleton instance of this class.
 java.lang.Object[] getRow()
          Always throws IllegalStateException.
 boolean next()
          Always returns false.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

next

public boolean next()
Always returns false.

Specified by:
next in interface RowSequence
Returns:
true iff this sequence has been advanced to the next row

getCell

public java.lang.Object getCell(int icol)
Always throws IllegalStateException.

Specified by:
getCell in interface RowSequence
Returns:
the contents of cell icol in the current row

getRow

public java.lang.Object[] getRow()
Always throws IllegalStateException.

Specified by:
getRow in interface RowSequence
Returns:
an array of the objects in each cell in row irow

close

public void close()
Does nothing.

Specified by:
close in interface RowSequence

getInstance

public static EmptyRowSequence getInstance()
Returns singleton instance of this class.

Returns:
instance

Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved.