Class SmallSet

  • All Implemented Interfaces:
    Iterable, Collection, Set

    public class SmallSet
    extends AbstractSet
    Lightweight implementation of Set which uses little memory to store a small number of items, at the expense of scalability. Not recomended for more than 20-30 items.

    This implementation has the useful property that the iteration order is the same as the order in which the items are added.

    Matthew Pocock