@Override public boolean contains(Object object){
  if (object == null) {
    return false;
  }
  for (int i=0; i < size; i++) {
    if (object.equals(elements[i])) {
      return true;
    }
  }
  return false;
}

@ Override public boolean contains ( Object object ) { if ( object == null ) { return false ; } for ( int i = 0 ; i < size ; i ++ ) { if ( object . equals ( elements [ i ] ) ) { return true ; } } return false ; }
answers if there is an element in this queue equals to the object .
