fr.univNantes.intcolls.internal
Class BlockIterator

java.lang.Object
  extended by fr.univNantes.intcolls.internal.BlockIterator
All Implemented Interfaces:
java.util.Iterator<java.lang.Integer>

public class BlockIterator
extends java.lang.Object
implements java.util.Iterator<java.lang.Integer>

Iterator of a block

Author:
Pierre-Olivier Terrisse.

Field Summary
private  Block block
          Block to iterator
private  int curBit
          Current bit
private  int curSlot
          Current slot
 
Constructor Summary
BlockIterator(Block b)
           
 
Method Summary
 int current()
           
 boolean hasNext()
          Return true if the block as a next value
 java.lang.Integer next()
          Return the next value
 void remove()
          Removes current value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

block

private Block block
Block to iterator


curSlot

private int curSlot
Current slot


curBit

private int curBit
Current bit

Constructor Detail

BlockIterator

public BlockIterator(Block b)
Method Detail

hasNext

public boolean hasNext()
Return true if the block as a next value

Specified by:
hasNext in interface java.util.Iterator<java.lang.Integer>
Returns:
true if the block contains more values

next

public java.lang.Integer next()
Return the next value

Specified by:
next in interface java.util.Iterator<java.lang.Integer>
Returns:
next value or -1 if no next value

remove

public void remove()
Removes current value

Specified by:
remove in interface java.util.Iterator<java.lang.Integer>

current

public int current()
Returns:
current value