edu.cmu.cs.coral.icf.plan_based.planners.pip
Class BindingSelectionChoiceIterator
java.lang.Object
|
+--edu.cmu.cs.coral.icf.plan_based.planners.pip.BindingSelectionChoiceIterator
- public class BindingSelectionChoiceIterator
- extends java.lang.Object
- implements java.util.Iterator
Represents an iterator over binding choices which are generated on the fly.
- Since:
- ICF 0.0
- Version:
- $Id$
Field Summary |
private Binding |
bindings
the bindings for the variables |
private java.util.Map |
curBindings
the mapping from variables to current bindings left |
private java.util.Map |
posBindings
a map from variables to possible bindings |
private java.util.List |
vars
an ordering of the variables |
Method Summary |
boolean |
hasNext()
Checks if there is a next element from this iterator. |
java.lang.Object |
next()
Gets the next element from this iterator. |
void |
remove()
Removes this element from the iterator's backing store. |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
posBindings
private java.util.Map posBindings
- a map from variables to possible bindings
- Since:
- ICF 0.0
vars
private java.util.List vars
- an ordering of the variables
- Since:
- ICF 0.0
curBindings
private java.util.Map curBindings
- the mapping from variables to current bindings left
- Since:
- ICF 0.0
bindings
private Binding bindings
- the bindings for the variables
- Since:
- ICF 0.0
BindingSelectionChoiceIterator
public BindingSelectionChoiceIterator(java.util.Map bindings)
- Generates a new iterator over the possible bindings for each variable
- Parameters:
bindings
- a map from variables to possible bindings- Since:
- ICF 0.0
hasNext
public boolean hasNext()
- Checks if there is a next element from this iterator.
- Specified by:
- hasNext in interface java.util.Iterator
- Returns:
- true if and only if this iterator has another element
- Since:
- ICF 0.0
next
public java.lang.Object next()
- Gets the next element from this iterator.
- Specified by:
- next in interface java.util.Iterator
- Returns:
- the next element of this iterator
- Since:
- ICF 0.0
remove
public void remove()
throws java.lang.UnsupportedOperationException
- Removes this element from the iterator's backing store.
- Specified by:
- remove in interface java.util.Iterator
- Throws:
- java.lang.UnsupportedOperationException - always
- Since:
- ICF 0.0