com.caucho.quercus.lib.spl
Class IteratorDelegate

java.lang.Object
  extended by com.caucho.quercus.lib.spl.IteratorDelegate
All Implemented Interfaces:
TraversableDelegate

public class IteratorDelegate
extends java.lang.Object
implements TraversableDelegate

A delegate that intercepts requests for iterator's and calls methods on target objects that implement the Iterator interface.


Nested Class Summary
static class IteratorDelegate.EntryImpl
           
static class IteratorDelegate.EntryIterator<T>
           
static class IteratorDelegate.KeyIterator<T>
           
static class IteratorDelegate.ValueIterator<T>
           
 
Constructor Summary
IteratorDelegate()
           
 
Method Summary
 java.util.Iterator<java.util.Map.Entry<Value,Value>> getIterator(Env env, ObjectValue qThis)
          Returns an iterator over the object's <key,value> entries.
 java.util.Iterator<Value> getKeyIterator(Env env, ObjectValue qThis)
          Returns an iterator over the object's keys
 java.util.Iterator<Value> getValueIterator(Env env, ObjectValue qThis)
          Returns an iterator over the object's values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IteratorDelegate

public IteratorDelegate()
Method Detail

getIterator

public java.util.Iterator<java.util.Map.Entry<Value,Value>> getIterator(Env env,
                                                                        ObjectValue qThis)
Description copied from interface: TraversableDelegate
Returns an iterator over the object's <key,value> entries.

Specified by:
getIterator in interface TraversableDelegate

getKeyIterator

public java.util.Iterator<Value> getKeyIterator(Env env,
                                                ObjectValue qThis)
Description copied from interface: TraversableDelegate
Returns an iterator over the object's keys

Specified by:
getKeyIterator in interface TraversableDelegate

getValueIterator

public java.util.Iterator<Value> getValueIterator(Env env,
                                                  ObjectValue qThis)
Description copied from interface: TraversableDelegate
Returns an iterator over the object's values.

Specified by:
getValueIterator in interface TraversableDelegate