Package uk.ac.starlink.ttools.plot2.data
Class WrapperTuple
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.data.WrapperTuple
-
- All Implemented Interfaces:
Tuple
- Direct Known Subclasses:
AbortTupleSequence
public class WrapperTuple extends java.lang.Object implements Tuple
Tuple implementation that delegates all methods to a base instance.- Since:
- 18 Nov 2013
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description WrapperTuple(Tuple base)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetBooleanValue(int icol)Returns the value of a given column as a boolean.doublegetDoubleValue(int icol)Returns the value of a given column as a double.intgetIntValue(int icol)Returns the value of a given column as an integer.longgetLongValue(int icol)Returns the value of a given column as a long.java.lang.ObjectgetObjectValue(int icol)Returns the value of a given column as an object.longgetRowIndex()Returns the row index for the underlying data set.
-
-
-
Constructor Detail
-
WrapperTuple
public WrapperTuple(Tuple base)
Constructor.- Parameters:
base- tuple to which all methods are delegated
-
-
Method Detail
-
getRowIndex
public long getRowIndex()
Description copied from interface:TupleReturns the row index for the underlying data set. Note this value may not undergo a simple increment between steps (if rows are excluded from the underlying data set it may increase by more than one in some cases).- Specified by:
getRowIndexin interfaceTuple- Returns:
- row index of underlying table row
-
getBooleanValue
public boolean getBooleanValue(int icol)
Description copied from interface:TupleReturns the value of a given column as a boolean. If that element of the table is not of boolean type, the result may not be useful.- Specified by:
getBooleanValuein interfaceTuple- Parameters:
icol- column index- Returns:
- value of element
icol, presumed of boolean type
-
getIntValue
public int getIntValue(int icol)
Description copied from interface:TupleReturns the value of a given column as an integer. If that element of the tuple is not of numeric type, the result may not be useful.- Specified by:
getIntValuein interfaceTuple- Parameters:
icol- column index- Returns:
- value of element
icol, presumed of numeric type
-
getDoubleValue
public double getDoubleValue(int icol)
Description copied from interface:TupleReturns the value of a given column as a double. If that element of the tuple is not of numeric type, the result may not be useful.- Specified by:
getDoubleValuein interfaceTuple- Parameters:
icol- column index- Returns:
- value of element
icol, presumed of numeric type
-
getLongValue
public long getLongValue(int icol)
Description copied from interface:TupleReturns the value of a given column as a long. If that element of the tuple is not of numeric type, the result may not be useful.- Specified by:
getLongValuein interfaceTuple- Parameters:
icol- column index- Returns:
- value of element
icol, presumed of numeric type
-
getObjectValue
public java.lang.Object getObjectValue(int icol)
Description copied from interface:TupleReturns the value of a given column as an object. If that element of the tuple is not of object type, the result may not be useful.If the result is a mutable object, its value may be overwritten by subsequent calls to this method (especially following calls to
SplittableSequence.next()if this object also implementsTupleSequence).- Specified by:
getObjectValuein interfaceTuple- Parameters:
icol- column index- Returns:
- value of element
icol, presumed of object type
-
-