Type Parameters

  • E

Constructors

Methods

  • Returns true if this collection contains the specified element. More formally, returns true if and only if this collection contains at least one element e such that Objects.equals(o, e).

    Parameters

    • o: any

      element whose presence in this collection is to be tested

    Returns boolean

    true if this collection contains the specified element

    Throws

    ClassCastException if the type of the specified element is incompatible with this collection (optional)

    Throws

    NullPointerException if the specified element is null and this collection does not permit null elements (optional)

  • Returns an iterator over the elements in this collection. There are no guarantees concerning the order in which the elements are returned (unless this collection is an instance of some class that provides a guarantee).

    Returns Iterator<E>

    an Iterator over the elements in this collection

  • Returns the number of elements in this collection. If this collection contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

    Returns number

    the number of elements in this collection