edu.harvard.seas.iis.util.combinatorics
Class DistinctPairsIterator
java.lang.Object
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)
DistinctPairsIterator
public DistinctPairsIterator(Collection c)
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