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

java.lang.Object
  extended by com.aliasi.util.Iterators.Empty<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.empty() instead.

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

An Iterator.Empty is an iterator with no objects. The method hasNext() always returns false, while the methods next() and remove() always throw exceptions.

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

Constructor Summary
Iterators.Empty()
          Deprecated. Use the static factory method Iterators.empty() instead.
 
Method Summary
 boolean hasNext()
          Deprecated. Always returns false.
 E next()
          Deprecated. Calling this method throws a no-such-element exception.
 void remove()
          Deprecated. Calling this method throws an illegal state exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Iterators.Empty

@Deprecated
public Iterators.Empty()
Deprecated. Use the static factory method Iterators.empty() instead.

Construct an empty iterator.

Method Detail

hasNext

public boolean hasNext()
Deprecated. 
Always returns false.

Specified by:
hasNext in interface Iterator<E>
Returns:
false.

next

public E next()
Deprecated. 
Calling this method throws a no-such-element exception.

Specified by:
next in interface Iterator<E>
Returns:
Always throws an exception.
Throws:
NoSuchElementException - Always.

remove

public void remove()
Deprecated. 
Calling this method throws an illegal state exception.

Specified by:
remove in interface Iterator<E>
Throws:
IllegalStateException - Always.