Package org.tweetyproject.arg.adf.util
Class ExcludeSubinterpretationsIterator
java.lang.Object
org.tweetyproject.arg.adf.util.ExcludeSubinterpretationsIterator
- All Implemented Interfaces:
Iterator<Interpretation>
Iterates through all interpretations except the ones equal to or more
specific than the provided ones.
- Author:
- Mathias Hofer
-
Constructor Summary
ConstructorsConstructorDescriptionExcludeSubinterpretationsIterator(List<Interpretation> interpretations) Constructs a newExcludeSubinterpretationsIteratorthat iterates over a list of interpretations, excluding subinterpretations according to a specific order and structure. -
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
ExcludeSubinterpretationsIterator
Constructs a newExcludeSubinterpretationsIteratorthat iterates over a list of interpretations, excluding subinterpretations according to a specific order and structure.The constructor initializes the iterator by ordering the interpretations based on the first interpretation in the list. It then builds a tree-like structure rooted in an
InnerNode, where each interpretation is added to the tree. This structure allows efficient exclusion of subinterpretations during iteration.- Parameters:
interpretations- A list ofInterpretationobjects to be iterated over.- Throws:
NoSuchElementException- if the list of interpretations is empty.
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceIterator<Interpretation>
-
next
- Specified by:
nextin interfaceIterator<Interpretation>
-