Class UniqueEList.FastCompare<E>

All Implemented Interfaces:
Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess, SequencedCollection<E>, EList<E>
Enclosing class:
UniqueEList<E>

public static class UniqueEList.FastCompare<E> extends UniqueEList<E>
A UniqueEList that uses == instead of equals to compare members.
See Also:
  • Constructor Details

    • FastCompare

      public FastCompare()
      Creates an empty instance with no initial capacity.
    • FastCompare

      public FastCompare(int initialCapacity)
      Creates an empty instance with the given capacity.
      Parameters:
      initialCapacity - the initial capacity of the list before it must grow.
      Throws:
      IllegalArgumentException - if the initialCapacity is negative.
    • FastCompare

      public FastCompare(Collection<? extends E> collection)
      Creates an instance that is a copy of the collection, with duplicates removed.
      Parameters:
      collection - the initial contents of the list.
  • Method Details

    • useEquals

      protected boolean useEquals()
      Returns false because this list uses ==.
      Overrides:
      useEquals in class AbstractEList<E>
      Returns:
      false.