|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sen.compiler.VirtualTupleList
public class VirtualTupleList
A file-mapped list of s.
Slightly slower than a simple in-memory sort, but capable of storing and
sorting very long lists without using large quantities of heap memory.StringCTokenTuple
The index of entry positions in the list's file is stored in memory, leading
to a usage of one Integer's worth of memory for each entry.
Usage:
- Call add(java.lang.String, net.java.sen.dictionary.CToken) one or more times
- Call sort() once. Once the list has been sorted, it is no longer
valid to add new entries
- Call get(int) to retrieve entries from the sorted list
| Constructor Summary | |
|---|---|
VirtualTupleList()
|
|
| Method Summary | |
|---|---|
void |
add(String string,
CToken ctoken)
Adds a StringCTokenTuple to the list. |
StringCTokenTuple |
get(int index)
Retrieves an entry from the list. |
int |
size()
Returns the number of entries in the list |
void |
sort()
Sorts the list |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VirtualTupleList()
throws IOException
IOException| Method Detail |
|---|
public void add(String string,
CToken ctoken)
throws IOException
string - The stringctoken - The CToken
IOExceptionpublic StringCTokenTuple get(int index)
index - The index of the entry to retrieve
public void sort()
throws IOException
IOExceptionpublic int size()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||