@Override public boolean addAll(Collection<? extends Long> c) { // The resulting collection will be at least c.size() big if (f <= .5) ensureCapacity(c.size()); // The resulting collection will be sized for c.size() elements else tryCapacity(size() + c.size()); // The resulting collection will be tentatively sized for size() + c.size() // elements return super.addAll(c); } @Override
public synchronized void add(long uid) { if (elems.size() == capacity) { elems.remove(elems.firstLong()); } elems.add(uid); }
@Override public boolean addAll(LongCollection c) { if (f <= .5) ensureCapacity(c.size()); // The resulting collection will be sized for c.size() elements else tryCapacity(size() + c.size()); // The resulting collection will be tentatively sized for size() + c.size() // elements return super.addAll(c); } @Override
it = s0.iterator(); documentIterator = AndDocumentIterator.getInstance( indexIterator, additionalIterator ); for( int j = s0.size(); j-- != 0; ) if ( it.nextLong() != documentIterator.nextDocument() ) throw new AssertionError();