-
- public final boolean hasMainEntry;
-
- TokenRow(final RandomAccessFile raf, final int thisRowIndex, final Index index, final boolean hasMainEntry) throws IOException {
- super(raf, thisRowIndex, index);
- this.hasMainEntry = hasMainEntry;
- }
-
- TokenRow(final int referenceIndex, final int thisRowIndex, final Index index, final boolean hasMainEntry) {
- super(referenceIndex, thisRowIndex, index);
- this.hasMainEntry = hasMainEntry;
- }
-
- public String toString() {
- return getToken() + "@" + referenceIndex;
- }
-
- @Override
- public TokenRow getTokenRow(final boolean search) {
- return this;
- }
-
- @Override
- public void setTokenRow(TokenRow tokenRow) {
- throw new RuntimeException("Shouldn't be setting TokenRow's TokenRow!");
- }
-
- public String getToken() {
- return getIndexEntry().token;
- }
-
- public IndexEntry getIndexEntry() {
- return index.sortedIndexEntries.get(referenceIndex);
- }
-
- @Override
- public void print(final PrintStream out) {
- final String surrounder = hasMainEntry ? "***" : "===";
- out.println(surrounder + getToken() + surrounder);
- for (final HtmlEntry htmlEntry : index.sortedIndexEntries.get(referenceIndex).htmlEntries) {
- out.println("HtmlEntry: " + htmlEntry.title + " <<<" + htmlEntry.html + ">>>");
+
+ public final boolean hasMainEntry;
+
+ TokenRow(final DataInput raf, final int thisRowIndex, final Index index,
+ final boolean hasMainEntry, int extra) throws IOException {
+ super(raf, thisRowIndex, index, extra);
+ this.hasMainEntry = hasMainEntry;