E - 元素类型public class ArrayIter<E> extends Object implements Iterator<E>, Iterable<E>, Serializable
| Constructor and Description | 
|---|
ArrayIter(Object array)
构造 
 | 
ArrayIter(Object array,
         int startIndex)
构造 
 | 
ArrayIter(Object array,
         int startIndex,
         int endIndex)
构造 
 | 
| Modifier and Type | Method and Description | 
|---|---|
Object | 
getArray()
获得原始数组对象 
 | 
boolean | 
hasNext()  | 
Iterator<E> | 
iterator()  | 
E | 
next()  | 
void | 
remove()
不允许操作数组元素 
 | 
void | 
reset()
重置数组位置 
 | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingforEach, spliteratorpublic ArrayIter(Object array)
array - 数组IllegalArgumentException - array对象不为数组抛出此异常NullPointerException - array对象为nullpublic ArrayIter(Object array, int startIndex)
array - 数组startIndex - 起始位置,当起始位置小于0或者大于结束位置,置为0。IllegalArgumentException - array对象不为数组抛出此异常NullPointerException - array对象为nullpublic ArrayIter(Object array, int startIndex, int endIndex)
array - 数组startIndex - 起始位置,当起始位置小于0或者大于结束位置,置为0。endIndex - 结束位置,当结束位置小于0或者大于数组长度,置为数组长度。IllegalArgumentException - array对象不为数组抛出此异常NullPointerException - array对象为nullpublic void remove()
remove in interface Iterator<E>UnsupportedOperationException - alwayspublic Object getArray()
public void reset()
Copyright © 2021. All rights reserved.