Package net.i2p.util

Class UnmodifiableSortedSet<E>

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

    public class UnmodifiableSortedSet<E>
    extends ArraySet<E>
    implements SortedSet<E>
    Efficient implementation of a SortedSet stored in a fixed-size array. Much more space-efficient than TreeSet. Doesn't do copying like CopyOnWriteArraySet. Unmodifiable, thread-safe. Null elements are not permitted. The Collection constructors are not recommended for large sets as the duplicate check is O(n**2).
    Since:
    0.9.55