text: public boolean contains(Object object) {if (object != null) {for (E element : a) {if (object.equals(element)) {return true;}}} else {for (E element : a) {if (element == null) {return true;}}}return false;}