com.aliasi.util
Class Iterators.ArraySlice<E>

java.lang.Object
  extended by com.aliasi.util.Iterators.ArraySlice<E>
Type Parameters:
E - the type of objects returned by the iterator
All Implemented Interfaces:
Iterator<E>
Enclosing class:
Iterators

Deprecated. Use the static factory method Iterators.arraySlice(Object[],int,int) instead.

@Deprecated
public static class Iterators.ArraySlice<E>
extends Object
implements Iterator<E>

An Iterators.ArraySlice iterates over a slice of an array specified by start index and length.

Since:
LingPipe1.0
Version:
3.8
Author:
Bob Carpenter

Constructor Summary
Iterators.ArraySlice(E[] objects, int start, int length)
          Deprecated. Use the static factory method Iterators.arraySlice(Object[],int,int) instead.
 
Method Summary
 boolean hasNext()
          Deprecated. Returns true if there are more objects to return.
 E next()
          Deprecated. Returns the next object for this iterator, throwing an exception if there are no more objects left.
 void remove()
          Deprecated. Throws an UnsupportedOperationException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Iterators.ArraySlice

@Deprecated
public Iterators.ArraySlice(E[] objects,
                                       int start,
                                       int length)
Deprecated. Use the static factory method Iterators.arraySlice(Object[],int,int) instead.

Construct an iterator over the specified array of objects that begins at the object at the specified start index and carries through to the other objects.

Parameters:
objects - Array of objects over which to iterate.
start - Index of first object to return.
length - Number of objects to iterate.
Throws:
Illegal - argument exception if start < 0 or start + length > objects.length.
Method Detail

hasNext

public boolean hasNext()
Deprecated. 
Returns true if there are more objects to return.

Specified by:
hasNext in interface Iterator<E>
Returns:
true if this iterator has more elements.

next

public E next()
Deprecated. 
Returns the next object for this iterator, throwing an exception if there are no more objects left.

Specified by:
next in interface Iterator<E>
Returns:
Next object from this iterator.
Throws:
NoSuchElementException - If there are no more elements to return.

remove

public void remove()
Deprecated. 
Throws an UnsupportedOperationException.

Specified by:
remove in interface Iterator<E>
Throws:
UnsupportedOperationException - If called.