public boolean containsKey(E e) {
    for (int i = 0; i < elements.length; i++) {
      Object element = elements[i];
      if (e == null && element == null) return true;
      if (e != null && e.equals(element)) return true;
    }
    return false;
  }