edu.harvard.seas.iis.util.combinatorics
Class DistinctPairsIterator

java.lang.Object
  extended by edu.harvard.seas.iis.util.combinatorics.DistinctPairsIterator
All Implemented Interfaces:
Iterator

public class DistinctPairsIterator
extends Object
implements Iterator

Author:
kgajos Generates distinct pairs out of a single collection of objects (if pair A,B is generated, then B,A won't be; it will never generate A,A either)

Constructor Summary
DistinctPairsIterator(Collection c)
           
 
Method Summary
 boolean hasNext()
           
 Object next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistinctPairsIterator

public DistinctPairsIterator(Collection c)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator

next

public Object next()
Specified by:
next in interface Iterator

remove

public void remove()
Specified by:
remove in interface Iterator