阅读背景:

ListIterator接口

来源:互联网 

/*
 * @(#)ListIterator.java	1.23 03/12/19
 *
 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

package java.util;

/**
 * 
 * An iterator for lists that allows the programmer 
 * to traverse the list in either direction, modify 
 * the list during iteration, and obtain the iterator"s 
 * current position in the list. A <TT>ListIterator</TT> 
 * has no current element; its <I>cursor position</I> always 
 * lies between the element that would be returned by a call 
 * to <TT>previous()</TT> and the element that would be 
 * returned by a call to <TT>next()</TT>. In a list of 
 * length <TT>n</TT>, there are <TT>n+1</TT> valid 
 * index values, from <TT>0</TT> to <TT>n</TT>, inclusive. 
 * <PRE>
 *
 *          Element(0)   Element(1)   Element(2)   ... Element(n)   
 *        ^            ^            ^            ^               ^
 * Index: 0            1            2            3               n+1
 *
 * </PRE>
 * <P>
 * Note that the {@link #remove} and {@link #set(Object)} methods are
 * <i>not</i> defined in terms of the cursor position;  they are defined to
 * operate on the last element returned by a call to {@link #next} or {@link
 * #previous()}.
 * <P>
 * This interface is a member of the 
 * <a href=#/*
 * @(#)ListIterator.java	1.23 03/12/19
 *
 * C




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: