|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.persistence.util.HashMapIndex
public class HashMapIndex
Implements a StringIndex that is based on a hashmap. Subclasses
can override the protected load() and save() methods
to implement persistent storage of the string index.
This class is thread-safe.
| Field Summary | |
|---|---|
protected HashMap<Integer,String> |
indexToString
holds the index-to-string lookups. |
protected HashMap<String,Integer> |
stringToIndex
holds the string-to-index lookups. |
| Constructor Summary | |
|---|---|
HashMapIndex()
|
|
| Method Summary | |
|---|---|
String |
indexToString(int i)
Returns the string for a given index. |
protected void |
load()
Loads the lookup table. |
protected void |
save()
Saves the lookup table. |
int |
stringToIndex(String nsUri)
Returns the index for a given string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final HashMap<String,Integer> stringToIndex
protected final HashMap<Integer,String> indexToString
| Constructor Detail |
|---|
public HashMapIndex()
| Method Detail |
|---|
protected void load()
protected void save()
public int stringToIndex(String nsUri)
stringToIndex in interface StringIndexnsUri - the indexed (or to be indexed) string
public String indexToString(int i)
indexToString in interface StringIndexi - index of a string
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||