@Override
 public boolean isEmpty() {
   for (Segment<K, V> segment : segments) {
     if (segment.size() > 0) return false;
   }
   return true;
 }
 @Override
 public int size() {
   long total = 0;
   for (Segment<K, V> segment : segments) {
     total += segment.size();
   }
   return (int) Math.min(Integer.MAX_VALUE, total);
 }
Beispiel #3
0
 public int size() {
     int retval=0;
     for(Segment segment: segments.values())
         retval+=segment.size();
     return retval;
 }