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

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

public class ChooseNIterator
extends java.lang.Object
implements java.util.Iterator

Author:
kgajos Iterator that generates subsets of a given size from an underlying collection

Constructor Summary
ChooseNIterator(java.util.Collection c, int n)
           
 
Method Summary
 boolean hasNext()
           
static void main(java.lang.String[] args)
           
 java.lang.Object next()
           
 void remove()
          This iterator does not support the remove operation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChooseNIterator

public ChooseNIterator(java.util.Collection c,
                       int n)
Method Detail

remove

public void remove()
This iterator does not support the remove operation

Specified by:
remove in interface java.util.Iterator
See Also:
Iterator.remove()

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator

main

public static void main(java.lang.String[] args)