java.util.Listpublic abstract boolean contains(Object o)
Returns true if this list contains the specified element.
More formally, returns true if and only if this list contains
at least one element e such that
(o==null ? e==null : o.equals(e)).
- Overrides:
contains in interface Collection
- Parameters:
o - element whose presence in this list is to be tested.
- Returns:
- true if this list contains the specified element.
- Throws:
ClassCastException - if the type of the specified element is incompatible with this list (optional). NullPointerException - if the specified element is null and this list does not support null elements (optional).