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

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

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

An Iterators.Pair provides an iterator over a sequence of exactly two elements.

Since:
LingPipe2.0
Version:
3.0
Author:
Bob Carpenter

Constructor Summary
Iterators.Pair(E member1, E member2)
          Deprecated. Use the static factory method Iterators.pair(Object,Object) instead.
 
Method Summary
 boolean hasNext()
          Deprecated. Returns true if there are more elements left to return.
 E next()
          Deprecated. Returns the next object in this pair iterator, or throws an exception if there aren't any more.
 void remove()
          Deprecated. Throws an unsupported operation exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Iterators.Pair

@Deprecated
public Iterators.Pair(E member1,
                                 E member2)
Deprecated. Use the static factory method Iterators.pair(Object,Object) instead.

Construct a pair iterator based on the containing pair set.

Parameters:
member1 - First member.
member2 - Second member.
Method Detail

hasNext

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

Specified by:
hasNext in interface Iterator<E>
Returns:
true if there are more elements left to return.

next

public E next()
Deprecated. 
Returns the next object in this pair iterator, or throws an exception if there aren't any more.

Specified by:
next in interface Iterator<E>
Returns:
Next object in this pair iterator.

remove

public void remove()
Deprecated. 
Throws an unsupported operation exception.

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