public LongBigList subList( long from, long to ) { ensureIndex( from ); ensureIndex( to ); if ( from > to ) throw new IndexOutOfBoundsException( "Start index (" + from + ") is greater than end index (" + to + ")" ); return new LongSubBigList( this, from, to ); } }
public void add( long k ) { if ( last == -1 ) throw new IllegalStateException(); LongSubBigList.this.add( pos++, k ); last = -1; if ( ASSERTS ) assertRange(); } public void set( long k ) {
public void remove() { if ( last == -1 ) throw new IllegalStateException(); LongSubBigList.this.removeLong( last ); /* * If the last operation was a next(), we are removing an element *before* us, and we * must decrease pos correspondingly. */ if ( last < pos ) pos--; last = -1; if ( ASSERTS ) assertRange(); } };
public LongListIterator listIterator( final int index ) { ensureIndex( index );
public LongListIterator listIterator( final int index ) { ensureIndex( index );
public boolean hasNext() { return pos < size(); } public boolean hasPrevious() { return pos > 0; }
public boolean hasNext() { return pos < size(); } public boolean hasPrevious() { return pos > 0; }
public long getLong( long index ) { ensureRestrictedIndex( index ); return l.getLong( from + index ); }
public long set( int index, long k ) { ensureRestrictedIndex( index ); return l.set( from + index, k ); }
public long set( int index, long k ) { ensureRestrictedIndex( index ); return l.set( from + index, k ); }
public long getLong( long index ) { ensureRestrictedIndex( index ); return l.getLong( from + index ); }
public void clear() { removeElements( 0, size() ); if ( ASSERTS ) assertRange(); }
public long removeLong( long index ) { ensureRestrictedIndex( index ); to--; return l.removeLong( from + index ); }
public void add( final int index, final long k ) { ensureIndex( index ); l.add( from + index, k ); to++; if ( ASSERTS ) assertRange(); }
public void clear() { removeElements( 0, size() ); if ( ASSERTS ) assertRange(); }
public void set( long k ) { if ( last == -1 ) throw new IllegalStateException(); LongSubBigList.this.set( last, k ); } public void remove() {
public long removeLong( long index ) { ensureRestrictedIndex( index ); to--; return l.removeLong( from + index ); }
public void add( final int index, final long k ) { ensureIndex( index ); l.add( from + index, k ); to++; if ( ASSERTS ) assertRange(); }
public void set( long k ) { if ( last == -1 ) throw new IllegalStateException(); LongSubBigList.this.set( last, k ); } public void remove() {
public void remove() { if ( last == -1 ) throw new IllegalStateException(); LongSubBigList.this.removeLong( last ); /* * If the last operation was a next(), we are removing an element *before* us, and we * must decrease pos correspondingly. */ if ( last < pos ) pos--; last = -1; if ( ASSERTS ) assertRange(); } };