code: public boolean contains(Object o) {
          if (o != null) {
              int mask = elements.length - 1;
              int i = head;
              for (Object x; (x = elements[i]) != null; i = (i + 1) & mask) {
                  if (o.equals(x))
                      return true;
              }
          }
          return false;
      }
docs: Returns {@code true} if this deque contains the specified element.
  More formally, returns {@code true} if and only if this deque contains
  at least one element {@code e} such that {@code o.equals(e)}.
  
  @param o object to be checked for containment in this deque
  @return {@code true} if this deque contains the specified element