|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.io.formats.dump.InMemoryStringIndex
public class InMemoryStringIndex
This is a gadget to allow in-memory sorting of a NamedObjectStore.
| Field Summary | |
|---|---|
byte[][] |
data
|
boolean |
loadData
|
long[] |
offsets
|
java.lang.String |
rememberMe
|
java.lang.String[] |
strings
|
| Constructor Summary | |
|---|---|
InMemoryStringIndex()
|
|
InMemoryStringIndex(boolean loadData)
|
|
| Method Summary | |
|---|---|
void |
appendToDump(NamedObjectDumpBuilder builder)
|
int |
compare(int index)
Compares the key of the item at the given index with the current remembered key. |
int |
getSize()
Returns the number of items in the array. |
java.lang.Object |
keyAt(int index)
|
void |
loadFromDump(java.lang.String dumpPath)
|
void |
remember(int index)
Remembers the key at the given index for future comparisons. |
void |
saveToDump(java.lang.String dumpPath)
|
void |
sort()
|
static void |
sortNamedObjectDump(java.lang.String dumpPath)
|
void |
swap(int a,
int b)
Swaps the items at the two index positions. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public java.lang.String[] strings
public long[] offsets
public byte[][] data
public boolean loadData
public java.lang.String rememberMe
| Constructor Detail |
|---|
public InMemoryStringIndex()
public InMemoryStringIndex(boolean loadData)
| Method Detail |
|---|
public static void sortNamedObjectDump(java.lang.String dumpPath)
throws java.io.IOException
java.io.IOException
public void loadFromDump(java.lang.String dumpPath)
throws java.io.IOException
java.io.IOException
public void saveToDump(java.lang.String dumpPath)
throws java.io.IOException
java.io.IOException
public void appendToDump(NamedObjectDumpBuilder builder)
throws java.io.IOException
java.io.IOExceptionpublic void sort()
public void remember(int index)
ArraySortingGopher
remember in interface ArraySortingGopherpublic int compare(int index)
ArraySortingGopher
compare in interface ArraySortingGopherpublic java.lang.Object keyAt(int index)
public int getSize()
ArraySortingGopher
getSize in interface ArraySortingGopher
public void swap(int a,
int b)
ArraySortingGopher
swap in interface ArraySortingGopher
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||