|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.v3x.io.formats.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[] |
strings
|
| Constructor Summary | |
|---|---|
InMemoryStringIndex()
|
|
InMemoryStringIndex(boolean loadData)
|
|
| Method Summary | |
|---|---|
void |
appendToDump(NamedObjectDumpBuilder builder)
|
int |
compare(int index,
java.lang.Object key)
Compares the key of the item at the given index using the key given, based on the default ordering. |
int |
compare(int index,
java.lang.Object key,
java.util.Comparator comp)
Compares the key of the item at the given index using the key and ordering given. |
int |
getSize()
Returns the number of items in the array. |
java.lang.Object |
keyAt(int index)
Gets the key object from the given index. |
void |
loadFromDump(java.lang.String dumpPath)
|
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
| 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 int compare(int index,
java.lang.Object key)
ArraySortingGopher
compare in interface ArraySortingGopher
public int compare(int index,
java.lang.Object key,
java.util.Comparator comp)
ArraySortingGopher
compare in interface ArraySortingGopherpublic java.lang.Object keyAt(int index)
ArraySortingGopher
keyAt in interface ArraySortingGopherpublic 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 | ||||||||