Class stub_iterator_c

java.lang.Object
  |
  +--stub_iterator_c
All Implemented Interfaces:
java.util.Iterator

public class stub_iterator_c
extends java.lang.Object
implements java.util.Iterator

Klassen implementerar en iterator mot en vektor med bildata. Den ska senare ersättas med en iterator mot ett databas-ResultSet med bildata.


Field Summary
private  int bil_index
           
private  bil_record_c bil_record
           
private  java.util.Vector bil_vektor
           
 
Constructor Summary
stub_iterator_c(java.util.Vector bil_vektor)
          Konstruktor.
 
Method Summary
 boolean hasNext()
          Ska anropas innan anrop till next().
 java.lang.Object next()
          Returnerar näst bilpost.
 void remove()
          Tar bort aktuell bilpost.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bil_vektor

private java.util.Vector bil_vektor

bil_index

private int bil_index

bil_record

private bil_record_c bil_record
Constructor Detail

stub_iterator_c

public stub_iterator_c(java.util.Vector bil_vektor)
Konstruktor.

Parameters:
bil_vektor - Vektor med bil_record_c-data som det ska itereras över
Method Detail

hasNext

public boolean hasNext()
Ska anropas innan anrop till next().

Specified by:
hasNext in interface java.util.Iterator
Returns:
true: det finns poster kvar, false: slut på poster

next

public java.lang.Object next()
                      throws java.util.NoSuchElementException
Returnerar näst bilpost.

Specified by:
next in interface java.util.Iterator
Returns:
Bilpost på bil_record_c-format. Kastar NoSuchElementException om det inte finns någon mer post.
java.util.NoSuchElementException

remove

public void remove()
Tar bort aktuell bilpost.

Specified by:
remove in interface java.util.Iterator