Class ArraySet<E>

All Implemented Interfaces:
Iterable<E>, Collection<E>, Set<E>
Direct Known Subclasses:
DelaunayTriangle

public class ArraySet<E> extends AbstractSet<E>
An ArrayList implementation of Set. An ArraySet is good for small sets; it has less overhead than a HashSet or a TreeSet.
Author:
Paul Chew Created December 2007. For use with Voronoi/Delaunay applet.
  • Constructor Details

    • ArraySet

      public ArraySet()
      Create an empty set (default initial capacity is 3).
    • ArraySet

      public ArraySet(Collection<? extends E> collection)
      Create a set containing the items of the collection. Any duplicate items are discarded.
      Parameters:
      collection - the source for the items of the small set
    • ArraySet

      public ArraySet(int initialCapacity)
      Create an empty set with the specified initial capacity.
      Parameters:
      initialCapacity - the initial capacity
  • Method Details