Multiple indexes for a Java Collection - most basic solution?

后端 未结 14 1742
小鲜肉
小鲜肉 2020-11-29 22:08

I\'m looking for the most basic solution to create multiple indexes on a Java Collection.

Required functionality:

  • When a Value is removed, all index en
14条回答
  •  粉色の甜心
    2020-11-29 22:37

    Each index will basically be a separate Map. You can (and probably should) abstract this behind a class that manages the searches, indexing, updates and removals for you. It wouldn't be hard to do this fairly generically. But no, there's no standard out of the box class for this although it can easily be built from the Java Collections classes.

提交回复
热议问题