Class ItemIdentitySet

All Implemented Interfaces:
Iterable<ItemIdentity>, Collection<ItemIdentity>, Set<ItemIdentity>

@Internal public class ItemIdentitySet extends AbstractSet<ItemIdentity>

An implementation of a Set of ItemIdentity, optimized for memory consumption and objects count.

Implementation Notes

Statistics: compared to HashSet, 4x less memory taken, 1.5x slower. The number of objects is ~ 10 (compared to N*2 with HashSet), if all item IDs are long. String item IDs create K*2 objects as well.