Chat
Class HostList.HostIterator

java.lang.Object
  |
  +--Chat.HostList.HostIterator
All Implemented Interfaces:
java.util.Iterator
Enclosing class:
HostList

class HostList.HostIterator
extends java.lang.Object
implements java.util.Iterator

A custom thread-safe iterator over the list.


Field Summary
(package private)  java.lang.Object[] array
          Cached array of list members, used for iterating.
(package private)  int i
          An index of the iteration.
(package private)  HostList list
          A link to parent HostList.
 
Constructor Summary
(package private) HostList.HostIterator(HostList list)
          Constructs a thread-safe iterator.
 
Method Summary
 boolean hasNext()
           
 java.lang.Object next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

list

HostList list
A link to parent HostList.

array

java.lang.Object[] array
Cached array of list members, used for iterating.

i

int i
An index of the iteration.
Constructor Detail

HostList.HostIterator

HostList.HostIterator(HostList list)
Constructs a thread-safe iterator.
Parameters:
list - parent HostList
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator

remove

public void remove()
Specified by:
remove in interface java.util.Iterator