I\'m looking for the most basic solution to create multiple indexes on a Java Collection.
Required functionality:
If you want multiple indexes on your data, you can create and maintain multiple hash maps or use a library like Data Store:
https://github.com/jparams/data-store
Example:
Store store = new MemoryStore<>() ;
store.add(new Person(1, "Ed", 3));
store.add(new Person(2, "Fred", 7));
store.add(new Person(3, "Freda", 5));
store.index("name", Person::getName);
Person person = store.getFirst("name", "Ed");
With data store you can create case-insensitive indexes and all sorts of cool stuff. Worth checking out.