KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > h2 > result > SimpleRow


1 /*
2  * Copyright 2004-2006 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
3  * Initial Developer: H2 Group
4  */

5 package org.h2.result;
6
7 import org.h2.value.Value;
8
9 public class SimpleRow implements SearchRow {
10     
11     private int pos;
12     private Value[] data;
13
14     public SimpleRow(Value[] data) {
15         this.data = data;
16     }
17
18     public int getColumnCount() {
19         return data.length;
20     }
21
22     public int getPos() {
23         return pos;
24     }
25     
26     public void setPos(int pos) {
27         this.pos = pos;
28     }
29     
30     public void setValue(int i, Value v) {
31         data[i] = v;
32     }
33
34     public Value getValue(int i) {
35         return data[i];
36     }
37
38 }
39
Popular Tags