Scalar { public T get(Object[] row) { return (T) row[position]; } protected  Scalar(int position); static Scalar<T> at(int position); static Scalar<T> at(E e); T get(Object[] row); void set(Object[] row, T value); T get(RowProxy row); void set(RowBuilder row, T value); Hasher hasher(); Aggregator<T> first(); Aggregator<Long> countLong(); Aggregator<Integer> countInt(); Aggregator<Double> averageDouble(); Aggregator<Double> medianDouble(); Aggregator<Long> sumLong(); Aggregator<Double> sumDouble(); int getPosition();  }
@Test public void testGet() { Scalar<Integer> S = Scalar.at(2); Object[] a = new Object[]{1, "a", 3, 8}; assertEquals(Integer.valueOf(3), S.get(a)); }
@Test public void testGet_FromEnum() { Object[] arr = new Object[]{1, "a", 3, 8}; assertEquals(Integer.valueOf(1), DFDescriptor.A.get(arr)); assertEquals("a", DFDescriptor.B.get(arr)); assertEquals(Integer.valueOf(3), DFDescriptor.C.get(arr)); }