@Test public void testSingleElementList() throws Exception { ListCursor<String> cursor = new ListCursor<String>( Collections.singletonList( "singleton" ) ); cursor.close(); assertClosed( cursor, "cursor.isClosed() should return true after closing the cursor", true ); try { cursor = new ListCursor<String>( Collections.singletonList( "singleton" ), 0 ); cursor.close(); fail( "when the start = end bounds this is senseless and should complain" ); } catch ( IllegalArgumentException e ) { assertNotNull( e ); } try { cursor = new ListCursor<String>( 1, Collections.singletonList( "singleton" ) ); cursor.close(); fail( "when the start = end bounds this is senseless and should complain" ); } catch ( IllegalArgumentException e ) { assertNotNull( e ); } try { cursor = new ListCursor<String>( 5, Collections.singletonList( "singleton" ) ); cursor.close(); fail( "when the start = end bounds this is senseless and should complain" ); } catch ( IllegalArgumentException e ) { assertNotNull( e ); } try { cursor = new ListCursor<String>( Collections.singletonList( "singleton" ), -5 ); cursor.close(); fail( "when the start = end bounds this is senseless and should complain" ); } catch ( IllegalArgumentException e ) { assertNotNull( e ); } try { cursor = new ListCursor<String>( -5, Collections.singletonList( "singleton" ) ); cursor.close(); fail( "when the start = end bounds this is senseless and should complain" ); } catch ( IllegalArgumentException e ) { assertNotNull( e ); } try { cursor = new ListCursor<String>( Collections.singletonList( "singleton" ), 5 ); cursor.close(); fail( "when the start = end bounds this is senseless and should complain" ); } catch ( IllegalArgumentException e ) { assertNotNull( e ); } }
@Override public void close() throws IOException { if ( LOG_CURSOR.isDebugEnabled() ) { LOG_CURSOR.debug( I18n.msg( I18n.MSG_13101_CLOSING_LIST_CURSOR, this ) ); } super.close(); }
ListCursor extends AbstractCursor<E> { @Override public void close() throws IOException { if ( LOG_CURSOR.isDebugEnabled() ) { LOG_CURSOR.debug( I18n.msg( I18n.MSG_13101_CLOSING_LIST_CURSOR, this ) ); } super.close(); } }
ListCursor extends AbstractCursor<E> { @Override public void close() throws IOException { if ( LOG_CURSOR.isDebugEnabled() ) { LOG_CURSOR.debug( I18n.msg( I18n.MSG_13101_CLOSING_LIST_CURSOR, this ) ); } super.close(); } ListCursor( Comparator<E> comparator, int start, List<E> list, int end );  ListCursor( int start, List<E> list, int end );  ListCursor( List<E> list, int end );  ListCursor( Comparator<E> comparator, List<E> list, int end );  ListCursor( int start, List<E> list );  ListCursor( Comparator<E> comparator, int start, List<E> list );  ListCursor( List<E> list );  ListCursor( Comparator<E> comparator, List<E> list ); @SuppressWarnings("unchecked")  ListCursor(); @SuppressWarnings("unchecked")  ListCursor( Comparator<E> comparator ); }
ListCursor extends AbstractCursor<E> { @Override public void close() throws IOException { if ( LOG_CURSOR.isDebugEnabled() ) { LOG_CURSOR.debug( I18n.msg( I18n.MSG_13101_CLOSING_LIST_CURSOR, this ) ); } super.close(); } ListCursor( Comparator<E> comparator, int start, List<E> list, int end );  ListCursor( int start, List<E> list, int end );  ListCursor( List<E> list, int end );  ListCursor( Comparator<E> comparator, List<E> list, int end );  ListCursor( int start, List<E> list );  ListCursor( Comparator<E> comparator, int start, List<E> list );  ListCursor( List<E> list );  ListCursor( Comparator<E> comparator, List<E> list ); @SuppressWarnings("unchecked")  ListCursor(); @SuppressWarnings("unchecked")  ListCursor( Comparator<E> comparator ); @Override boolean available(); @Override void before( E element ); @Override void after( E element ); @Override void beforeFirst(); @Override void afterLast(); @Override boolean first(); @Override boolean last(); @Override boolean isFirst(); @Override boolean isLast(); @Override boolean isAfterLast(); @Override boolean isBeforeFirst(); @Override boolean previous(); @Override boolean next(); @Override E get(); @Override void close(); @Override void close( Exception cause ); }
ListCursor extends AbstractCursor<E> { @Override public void close() throws IOException { if ( LOG_CURSOR.isDebugEnabled() ) { LOG_CURSOR.debug( I18n.msg( I18n.MSG_13101_CLOSING_LIST_CURSOR, this ) ); } super.close(); } ListCursor( Comparator<E> comparator, int start, List<E> list, int end );  ListCursor( int start, List<E> list, int end );  ListCursor( List<E> list, int end );  ListCursor( Comparator<E> comparator, List<E> list, int end );  ListCursor( int start, List<E> list );  ListCursor( Comparator<E> comparator, int start, List<E> list );  ListCursor( List<E> list );  ListCursor( Comparator<E> comparator, List<E> list ); @SuppressWarnings("unchecked")  ListCursor(); @SuppressWarnings("unchecked")  ListCursor( Comparator<E> comparator ); @Override boolean available(); @Override void before( E element ); @Override void after( E element ); @Override void beforeFirst(); @Override void afterLast(); @Override boolean first(); @Override boolean last(); @Override boolean isFirst(); @Override boolean isLast(); @Override boolean isAfterLast(); @Override boolean isBeforeFirst(); @Override boolean previous(); @Override boolean next(); @Override E get(); @Override void close(); @Override void close( Exception cause );  }