private SimpleHashSetEntry < T > [ ] makeTable ( int newCapacity ) { @ SuppressWarnings ( "unchecked" ) SimpleHashSetEntry < T > [ ] newTable = ( SimpleHashSetEntry < T > [ ] ) new SimpleHashSetEntry [ newCapacity ] ; mTable = newTable ; threshold = ( newCapacity >> 1 ) + ( newCapacity >> 2 ) ; // 3/4 capacity return newTable ; }
Allocate a table of the given capacity and set the threshold accordingly .