com.jrockit.mc.flightrecorder.util
Class ArrayIterator<Type>

java.lang.Object
  extended by com.jrockit.mc.flightrecorder.util.ArrayIterator<Type>
All Implemented Interfaces:
java.util.Iterator<Type>

public final class ArrayIterator<Type>
extends java.lang.Object
implements java.util.Iterator<Type>

Iterator that iterates over an array. Hopefully faster than Arrays.asList(...).iterator() since there are no concurrency checks and everything is already "inlined".

Author:
Erik Gahlin

Constructor Summary
ArrayIterator(Type[] range)
           
 
Method Summary
 boolean hasNext()
           
 Type next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayIterator

public ArrayIterator(Type[] range)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<Type>

next

public Type next()
Specified by:
next in interface java.util.Iterator<Type>

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<Type>


Copyright © 1999, 2011, Oracle and/or its affiliates. All rights reserved.