Eddie Epstein wrote:
Hi Isaac,

If I understand your scenario, you want to ignore duplicate Person annotations. The set index type is useful for just this purpose.

The javadocs for this index type say:
Indexing strategy: set index. A set index contains no duplicates of the same type, where a duplicate is defined by the indexing comparator. A set index is not guaranteed to be sorted.

A simple test shows an iterator for a set index to respect sort order, so I'm not sure what the documentation means about "not guaranteeed to be sorted". We'll have to wait for Thilo to clarify this.

The actual implementation does use a sorted set (as opposed
to, say, a hash set).  So annotations do come out sorted on
iteration.  I don't see that changing in the near future.

Let me know if Eddie's comments answered your question or not.


--Thilo

Reply via email to