@Override public IntListIterator listIterator() { return list.listIterator(); } @Override
@Override public IntListIterator listIterator(final int i) { return list.listIterator(i); } @Override
@Override public IntListIterator listIterator(final int i) { return IntIterators.unmodifiable(list.listIterator(i)); } @Override
@Override public IntBigListIterator listIterator() { return IntBigListIterators.asBigListIterator(list.listIterator()); } @Override
@Override public IntListIterator listIterator() { return IntIterators.unmodifiable(list.listIterator()); } @Override
@Override public IntBigListIterator listIterator(final long index) { return IntBigListIterators.asBigListIterator(list.listIterator(intIndex(index))); } @Override
/** Returns an iterator on sizes. * * <p>The purpose of this method is to provide {@link #combineSizes(OutputBitStream)} implementations with * a way to access the size list from a disk file or from {@link BitStreamIndex#sizes} transparently. * This mechanism is essential to ensure that size files are read exactly once. * * <p>The caller should check whether the returned object implements {@link Closeable}, * and, in this case, invoke {@link Closeable#close()} after usage. * * @param numIndex the number of an index. * @return an iterator on the sizes of the index. */ protected IntIterator sizes( int numIndex ) throws FileNotFoundException { if ( index[ numIndex ].sizes != null ) return index[ numIndex ].sizes.listIterator(); LOGGER.debug( "Reading sizes from " + inputBasename[ numIndex ] + DiskBasedIndex.SIZES_EXTENSION ); return new GammaCodedIntIterator( new InputBitStream( inputBasename[ numIndex ] + DiskBasedIndex.SIZES_EXTENSION ) ); }
/** Returns an iterator on sizes. * * <p>The purpose of this method is to provide {@link #combineSizes(OutputBitStream)} implementations with * a way to access the size list from a disk file or from {@link BitStreamIndex#sizes} transparently. * This mechanism is essential to ensure that size files are read exactly once. * * <p>The caller should check whether the returned object implements {@link Closeable}, * and, in this case, invoke {@link Closeable#close()} after usage. * * @param numIndex the number of an index. * @return an iterator on the sizes of the index. */ protected IntIterator sizes( int numIndex ) throws IOException { if ( index[ numIndex ].sizes != null ) return index[ numIndex ].sizes.listIterator(); LOGGER.debug( "Reading sizes from " + inputBasename[ numIndex ] + DiskBasedIndex.SIZES_EXTENSION ); return new GammaCodedIntIterator( new InputBitStream( ioFactory.getInputStream( inputBasename[ numIndex ] + DiskBasedIndex.SIZES_EXTENSION ), false ) ); }
return 0; if (l instanceof IntList) { final IntListIterator i1 = listIterator(), i2 = ((IntList) l).listIterator(); int r; int e1, e2;
@Override public boolean equals(final Object o) { if (o == this) return true; if (!(o instanceof List)) return false; final List<?> l = (List<?>) o; int s = size(); if (s != l.size()) return false; if (l instanceof IntList) { final IntListIterator i1 = listIterator(), i2 = ((IntList) l).listIterator(); while (s-- != 0) if (i1.nextInt() != i2.nextInt()) return false; return true; } final ListIterator<?> i1 = listIterator(), i2 = l.listIterator(); while (s-- != 0) if (!valEquals(i1.next(), i2.next())) return false; return true; } /**