@Override public void clear(){
  if (elementCount > 0) {
    elementCount=0;
    Arrays.fill(elementData,null);
    modCount++;
    while (referenceQueue.poll() != null) {
    }
  }
}

@ Override public void clear ( ) { if ( elementCount > 0 ) { elementCount = 0 ; Arrays . fill ( elementData , null ) ; modCount ++ ; while ( referenceQueue . poll ( ) != null ) { } } }
removes all mappings from this map , leaving it empty .
