|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ObjectIterator
Iterator over an ObjectSet
. This interface
extends the Java Iterator interface in two ways:
skipIndistinguishable
method that skips objects that are indistinguishable from the last
returned object, and returns the number of objects skipped.
canDetermineNext
method checks whether the world
underlying an iterator is complete enough to determine the iterator's
next element.
Method Summary | |
---|---|
boolean |
canDetermineNext()
Returns true if this ObjectIterator is running on a partial world that is complete enough to determine whether there is a next object, and if so, what that object is. |
int |
skipIndistinguishable()
Skips remaining objects that are indistinguishable from the object returned by the last call to next . |
Methods inherited from interface java.util.Iterator |
---|
hasNext, next, remove |
Method Detail |
---|
int skipIndistinguishable()
next
. Two
objects are indistinguishable if the underlying partial world
implies that they both satisfy the same POP application,
neither one serves as a value or argument for any instantiated
basic random variable, and neither one occurs in the set of
"externally distinguished" objects passed to the
iterator
call that produced this iterator.
Typically, the externally distinguished objects are the values
of logical variables in the current scope.
This method can only be called immediately after a call to
next
: that is, there can be no intervening calls to
any methods on this iterator. Even calling hasNext
may
cause some implementations to lose internal state that is necessary
for skipping indistinguishable objects.
java.lang.IllegalStateException
- if next
has not been
called yet, or if any other method has
been called on this iterator since the
last call to next
boolean canDetermineNext()
hasNext
is called when canDetermineNext
would return false,
then hasNext
returns false.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |