org.eclipse.higgins.util.jscript
Class JScriptObjectImmutableIterator

java.lang.Object
  extended byorg.eclipse.higgins.util.jscript.JScriptObjectImmutableIterator
All Implemented Interfaces:
Iterator

public class JScriptObjectImmutableIterator
extends Object
implements Iterator

Allows single objects to be viewed as an iterator This is a version of Iterator that overrides the remove method so that items can't be taken out of the Native Array, and helps with type mapping.

Author:
dbuss@novell.com

Constructor Summary
JScriptObjectImmutableIterator(HashSet obj)
           
JScriptObjectImmutableIterator(Iterator obj)
           
JScriptObjectImmutableIterator(Iterator obj, Class returnClass)
           
JScriptObjectImmutableIterator(Map obj)
           
JScriptObjectImmutableIterator(org.mozilla.javascript.NativeArray obj)
          Create a new ImmutableIterator
 
Method Summary
 boolean hasNext()
          Standard hasNext method
 Object next()
          Standard next method
 void remove()
          Makes sure that no one can remove any elements from the collection
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JScriptObjectImmutableIterator

public JScriptObjectImmutableIterator(org.mozilla.javascript.NativeArray obj)
Create a new ImmutableIterator


JScriptObjectImmutableIterator

public JScriptObjectImmutableIterator(Iterator obj)

JScriptObjectImmutableIterator

public JScriptObjectImmutableIterator(Iterator obj,
                                      Class returnClass)

JScriptObjectImmutableIterator

public JScriptObjectImmutableIterator(Map obj)

JScriptObjectImmutableIterator

public JScriptObjectImmutableIterator(HashSet obj)
Method Detail

hasNext

public boolean hasNext()
Standard hasNext method

Specified by:
hasNext in interface Iterator

next

public Object next()
            throws NoSuchElementException
Standard next method

Specified by:
next in interface Iterator
Throws:
NoSuchElementException

remove

public void remove()
            throws UnsupportedOperationException
Makes sure that no one can remove any elements from the collection

Specified by:
remove in interface Iterator
Throws:
UnsupportedOperationException