- final class Index {
- // One big list!
- // Various sub-types.
- // persisted
- List<Row> rows;
-
- // persisted
- List<IndexEntry> sortedIndexEntries;
-
- Dictionary getDict() {
- return Dictionary.this;
- }
- }
-
- static final class IndexEntry implements RAFSerializable<IndexEntry> {
- String token;
- int startRow;
-
- public void write(RandomAccessFile raf) throws IOException {
- raf.writeUTF(token);
- raf.write(startRow);
- }
- }