Class ConstantStarTable
java.lang.Object
uk.ac.starlink.table.AbstractStarTable
uk.ac.starlink.table.RandomStarTable
uk.ac.starlink.table.ConstantStarTable
- All Implemented Interfaces:
Closeable, AutoCloseable, StarTable
Table implementation representing a table in which every row is
the same as every other.
- Since:
- 3 Jul 2006
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionConstantStarTable(ColumnInfo[] infos, Object[] cells, long nrow) Constructs a new constant star table. -
Method Summary
Modifier and TypeMethodDescriptiongetCell(long lrow, int icol) Implementations of this method must be safe for concurrent calls from multiple threads.intReturns the number of columns in this table.getColumnInfo(int icol) Returns the object describing the data in a given column.longImplementations must supply a non-negative return value.booleanisRandom()Returns true.Methods inherited from class RandomStarTable
getRowAccess, getRowSequenceMethods inherited from class AbstractStarTable
checkedLongToInt, close, getColumnAuxDataInfos, getName, getParameters, getRow, getRowSplittable, getURL, setName, setParameters, setURLMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface StarTable
getParameterByName, setParameter
-
Constructor Details
-
ConstantStarTable
Constructs a new constant star table.- Parameters:
infos- array of column metadata objects (one for each column)cells- row data - the same for every rownrow- number of rows in this table
-
-
Method Details
-
getColumnCount
public int getColumnCount()Description copied from interface:StarTableReturns the number of columns in this table.- Specified by:
getColumnCountin interfaceStarTable- Specified by:
getColumnCountin classAbstractStarTable- Returns:
- the number of columns
-
getColumnInfo
Description copied from interface:StarTableReturns the object describing the data in a given column.- Specified by:
getColumnInfoin interfaceStarTable- Specified by:
getColumnInfoin classAbstractStarTable- Parameters:
icol- the column for which header information is required- Returns:
- a ValueInfo object for column
icol
-
getRowCount
public long getRowCount()Description copied from class:RandomStarTableImplementations must supply a non-negative return value.- Specified by:
getRowCountin interfaceStarTable- Specified by:
getRowCountin classRandomStarTable- Returns:
- the number of rows in the table
-
isRandom
public boolean isRandom()Description copied from class:RandomStarTableReturns true.- Specified by:
isRandomin interfaceStarTable- Overrides:
isRandomin classRandomStarTable- Returns:
- true
-
getCell
Description copied from class:RandomStarTableImplementations of this method must be safe for concurrent calls from multiple threads.- Specified by:
getCellin interfaceStarTable- Specified by:
getCellin classRandomStarTable- Parameters:
lrow- the index of the cell's rowicol- the index of the cell's column- Returns:
- the contents of this cell
-