Пример #1
0
 /**
  * Gets the size of the internal arrays
  *
  * @return the size of the arrays
  */
 public int getSize() {
   checkCompressing();
   return auxStore.getSize();
 }
Пример #2
0
 /**
  * Gets if the store would benefit from compression.<br>
  * <br>
  * If this method is called when the store is being accessed by another thread, it may give
  * spurious results.
  *
  * @return true if compression would reduce the store size
  */
 @Override
 public final boolean needsCompression() {
   int entries = auxStore.getEntries();
   int size = auxStore.getSize();
   return auxStore.isAboveMinimumSize() && (entries << 3) / 3 < size;
 }