code: public void clear()
      {
          // clear out ref queue. We don't need to expunge entries
          // since gc'ed entries won't get copied.
          emptyReferenceQueue();
  
          for (int i = 0; i < table.length; i++)
          {
              Entry e = table[i];
              Entry first = null;
              Entry prev = null;
              while (e != null)
              {
                  Object candidate = e.get();
                  if (candidate != null)
                  {
                      Entry dirty = e.makeDirtyAndWeak(queue);
                      if (first == null)
                      {
                          first = dirty;
                      }
                      if (prev != null)
                      {
                          prev.setNext(dirty);
                      }
                      prev = dirty;
                  }
                  else
                  {
                      if (prev != null)
                      {
                          prev.setNext(e.getState().next);
                      }
                      size--;
                  }
                  e = e.getState().next;
              }
              table[i] = first;
          }
  
          // Allocation of array may have caused GC, which may have caused
          // additional entries to go stale.  Removing these entries from the
          // reference queue will make them eligible for reclamation.
          expungeStaleEntries();
      }
docs: we don't actually clear anything, just make things weak and dirty