|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.qtunes.db.spi.simple.BitSetTextIndex
public class BitSetTextIndex
Simple index based on BitSet per letter. Example: BitSetTextIndex searcher = new BitSetTextIndex(); searcher.add(index, "phrase"); // repeat BitSet found = searcher.get("hra"); // found contains index
Constructor Summary | |
---|---|
BitSetTextIndex()
|
Method Summary | |
---|---|
void |
add(BitSet indices,
String phrase)
Add the specified indices to the BitSetTextIndex, keyed on phrase |
void |
add(int index,
String phrase)
Add the specified index to the BitSetTextIndex, keyed on phrase |
void |
clear(BitSet set)
Remove the specified indices from the BitSetTextIndex |
void |
clear(int index)
Remove the specified index from the BitSetTextIndex |
BitSet |
get(String substring)
Return a BitSet containing the indices that were added with a phrase containing the specified substring. |
void |
load(InputStream in)
Load the TextIndex from the specified InputStream |
static void |
main(String[] args)
|
void |
save(OutputStream out)
Save the TextIndex to the specified OutputStream |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BitSetTextIndex()
Method Detail |
---|
public void add(BitSet indices, String phrase)
add
in interface TextIndex
public void add(int index, String phrase)
add
in interface TextIndex
public void clear(int index)
clear
in interface TextIndex
public void clear(BitSet set)
clear
in interface TextIndex
public BitSet get(String substring)
get
in interface TextIndex
public void save(OutputStream out) throws IOException
TextIndex
save
in interface TextIndex
IOException
public void load(InputStream in) throws IOException
TextIndex
load
in interface TextIndex
IOException
public static void main(String[] args) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |