@Override public void add(final long i, final K k) { synchronized (sync) { list.add(i, k); } } @Override
@Override public boolean add(final K k) { l.add(to, k); to++; assert assertRange(); return true; } @Override
/** Returns all lines of the file wrapped by this file-lines collection. * * @return all lines of the file wrapped by this file-lines collection. */ public ObjectBigList<byte[]> allLines() { final ObjectBigList<byte[]> result = new ObjectBigArrayBigList<>(); for(final Iterator<byte[]> i = iterator(); i.hasNext();) result.add(i.next()); return result; }
@Override public void add(final long index, final K k) { ensureIndex(index); l.add(from + index, k); to++; assert assertRange(); } @Override
/** Returns all lines of the file wrapped by this file-lines collection. * * @return all lines of the file wrapped by this file-lines collection. */ public ObjectBigList<MutableString> allLines() { final ObjectBigList<MutableString> result = new ObjectBigArrayBigList<>(); for(final Iterator<MutableString> i = iterator(); i.hasNext();) result.add(i.next().copy()); return result; }
while(termsIter.hasNext()) { String term = termsIter.next().toString(); directTerms.add(term); directTermIds.put(term, termID++);
if(directTermId == directTermIds.defaultReturnValue()) { directTerms.add(termString); directTermId = directTerms.size64() -1; directTermIds.put(termString, directTermId);