1
2
3
4
5
6
7
8
9
10
11 package org.astrogrid.scripting.table;
12
13 import uk.ac.starlink.table.ColumnInfo;
14 import uk.ac.starlink.table.StarTable;
15
16 /*** Define a new column using values returned by a {@link org.astrogrid.scripting.table.ColumnFunction}
17 * @author Noel Winstanley nw@jb.man.ac.uk 07-Dec-2004
18 *
19 */
20 class FunctionColumnWrapperTable extends AbstractColumnWrapperTable implements
21 ScriptStarTable {
22
23 /*** Construct a new FunctionColumnWrapperTable
24 * @param meta
25 * @param original
26 */
27 public FunctionColumnWrapperTable(ColumnInfo meta, ColumnFunction funct,StarTable original) {
28 super(meta, original);
29 this.funct = funct;
30 }
31 protected final ColumnFunction funct;
32
33 /***
34 * @throws Exception
35 * @see org.astrogrid.scripting.table.AbstractColumnWrapperTable#computeValue(java.lang.Object[])
36 */
37 protected Object computeValue(Object[] row) throws Exception {
38 return funct.computeValue(row);
39 }
40
41 }
42
43
44
45
46
47
48
49
50
51
52