1 package com.hughes.android.dictionary.engine;
3 import java.io.IOException;
4 import java.io.PrintStream;
5 import java.io.RandomAccessFile;
7 public class TokenRow extends RowBase {
9 TokenRow(final RandomAccessFile raf, final int thisRowIndex, final Index index) throws IOException {
10 super(raf, thisRowIndex, index);
13 TokenRow(final int referenceIndex, final int thisRowIndex, final Index index) {
14 super(referenceIndex, thisRowIndex, index);
17 public String toString() {
18 return getToken() + "@" + referenceIndex;
22 public TokenRow getTokenRow(final boolean search) {
27 public void setTokenRow(TokenRow tokenRow) {
28 throw new RuntimeException("Shouldn't be setting TokenRow's TokenRow!");
31 public String getToken() {
32 return index.sortedIndexEntries.get(referenceIndex).token;
36 public void print(final PrintStream out) {
37 out.println(getToken());
41 public String getRawText(boolean compact) {