Class SubsetIterator<T>

java.lang.Object
org.tweetyproject.commons.util.SubsetIterator<T>
Type Parameters:
T - The elements of the set
All Implemented Interfaces:
Iterator<Set<T>>
Direct Known Subclasses:
DefaultSubsetIterator, IncreasingSubsetIterator, RandomSubsetIterator

public abstract class SubsetIterator<T> extends Object implements Iterator<Set<T>>
Iterates over all subsets of a given set.
Author:
Matthias Thimm
  • Constructor Details

    • SubsetIterator

      public SubsetIterator(Set<T> set)
      Creates a new subset iterator for the given set.
      Parameters:
      set - some set.
  • Method Details

    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<T>
    • hasNext

      public abstract boolean hasNext()
      Specified by:
      hasNext in interface Iterator<T>
    • next

      public abstract Set<T> next()
      Specified by:
      next in interface Iterator<T>