public boolean hasNext() {
return (this.nextEntry != null);
}
public Object next() {
ObjectEntry current = this.nextEntry;
if ( current != null ) {
setNext();
} else {
throw new NoSuchElementException( "No more elements to return" );
}
if ( this.type == OBJECT ) {
InternalFactHandle handle = (InternalFactHandle) current.getKey();
Object object = (handle.isShadowFact()) ? ((ShadowProxy) handle.getObject()).getShadowedObject() : handle.getObject();
return object;
} else {
return current.getKey();
}
}