Class UnmodifiableArraySet<E>

  • All Implemented Interfaces:
    Externalizable, Serializable, Iterable<E>, Collection<E>, Set<E>

    public class UnmodifiableArraySet<E>
    extends AbstractSet<E>
    implements Externalizable

    An unmodifiable compact Set implementation that stores the elements in hashCode order. The emphasis is to use as little heap space as possible - this is not a general-purpose Set implementation.

    This set does not support null values.

    This set will generally operate at O(log n) due to binary search. In general, it will not be as fast as the O(1) behavior of HashSet. Here we give up speed to save space.

    This set is not thread safe.

    AO Industries, Inc.
    See Also:
    to properly sort objects before adding to the set, Serialized Form