All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class COM.objectspace.jgl.HashSetIterator

java.lang.Object
   |
   +----COM.objectspace.jgl.HashSetIterator

public final class HashSetIterator
extends Object
implements ForwardIterator, Opaque
A HashSetIterator is a forward iterator that allows you to iterate through the contents of a HashSet.

See Also:
ForwardIterator

Constructor Index

 o HashSetIterator()
Construct myself to be an iterator with no associated data structure or position.
 o HashSetIterator(HashSetIterator)
Construct myself to be a copy of an existing iterator.

Method Index

 o advance()
Advance by one.
 o advance(int)
Advance by a specified amount.
 o atBegin()
Return true if I'm positioned at the first item of my input stream.
 o atEnd()
Return true if I'm positioned after the last item in my input stream.
 o clone()
Return a clone of myself.
 o distance(ForwardIterator)
Return the distance from myself to another iterator.
 o equals(Object)
Return true if a specified object is the same kind of iterator as me and is positioned at the same element.
 o get()
Return the object at my current position.
 o get(int)
Return the object that is a specified distance from my current position.
 o getContainer()
Return my associated HashSet
 o hasMoreElements()
Return true if there are more elements in my input stream.
 o isCompatibleWith(InputIterator)
Return true if both iterator and myself can be used as a range.
 o nextElement()
Return the next element in my input stream.
 o opaqueData()
Should not be used directly.
 o opaqueId()
Should not be used directly.
 o put(int, Object)
Write an object at a specified distance from my current position.
 o put(Object)
HashSet the object at my current position to a specified value.

Constructors

 o HashSetIterator
 public HashSetIterator()
Construct myself to be an iterator with no associated data structure or position.

 o HashSetIterator
 public HashSetIterator(HashSetIterator iterator)
Construct myself to be a copy of an existing iterator.

Parameters:
iterator - The iterator to copy.

Methods

 o clone
 public Object clone()
Return a clone of myself.

Overrides:
clone in class Object
 o equals
 public boolean equals(Object object)
Return true if a specified object is the same kind of iterator as me and is positioned at the same element.

Parameters:
object - Any object.
Overrides:
equals in class Object
 o atBegin
 public boolean atBegin()
Return true if I'm positioned at the first item of my input stream.

 o atEnd
 public boolean atEnd()
Return true if I'm positioned after the last item in my input stream.

 o hasMoreElements
 public boolean hasMoreElements()
Return true if there are more elements in my input stream.

 o advance
 public void advance()
Advance by one.

 o advance
 public void advance(int n)
Advance by a specified amount.

Parameters:
n - The amount to advance.
Throws: InvalidOperationException
If the parameter is less than zero.
 o nextElement
 public Object nextElement()
Return the next element in my input stream.

Throws: NoSuchElementException
If I'm positioned at an invalid position.
 o get
 public Object get()
Return the object at my current position.

 o get
 public Object get(int offset)
Return the object that is a specified distance from my current position.

Parameters:
offset - The offset from my current position.
Throws: InvalidOperationException
If the parameter is less than zero.
 o put
 public void put(int offset,
                 Object object)
Write an object at a specified distance from my current position.

Parameters:
offset - The offset from my current position.
object - The object to write.
Throws: InvalidOperationException
If the parameter is less than zero.
 o put
 public void put(Object object)
HashSet the object at my current position to a specified value.

Parameters:
object - The object to be written at my current position.
 o distance
 public int distance(ForwardIterator iterator)
Return the distance from myself to another iterator. I should be before the specified iterator.

Parameters:
iterator - The iterator to compare myself against.
 o getContainer
 public Container getContainer()
Return my associated HashSet

 o isCompatibleWith
 public boolean isCompatibleWith(InputIterator iterator)
Return true if both iterator and myself can be used as a range.

 o opaqueData
 public Object opaqueData()
Should not be used directly.

See Also:
Opaque
 o opaqueId
 public int opaqueId()
Should not be used directly.

See Also:
Opaque

All Packages  Class Hierarchy  This Package  Previous  Next  Index