public void clear ( final boolean shrink ) { while ( queue . poll ( ) != null ) { ; } if ( elementCount > 0 ) { elementCount = 0 ; } if ( shrink && ( elementData . length > 1024 ) && ( elementData . length > defaultSize ) ) { elementData = newElementArray ( defaultSize ) ; } else { Arrays . fill ( elementData , null ) ; } computeMaxSize ( ) ; while ( queue . poll ( ) != null ) { ; } }
Clear the set