Did you wake up this morning and say, "Gee, I need to start indexing"? ;-)
Is there something specific you are trying to index? Your query is so open-ended its difficult to provide an answer. If you provide more information about what your doing, someone may be able to give specific guidance.
I your key is a String and your value a String, this works as an index
public class MyIndex{
HashMap map;
...
public void add(String key, String value){
map.put(key,value);
}
public String get(String key){
return (String)map.get(key);
}
public void save(File f){
//write map which implements Serializable (see http://java.sun.com/j2se/1.4.2/docs/api/java/io/Serializable.html)
}
public void load(File f){
//read map which implements Serializable
}
}
Gil