coins.aflow.util
Class BitVectorIteratorImpl

java.lang.Object
  extended bycoins.aflow.util.BitVectorIteratorImpl
All Implemented Interfaces:
BitVectorIterator
Direct Known Subclasses:
ExpVectorIteratorImpl, FlowAnalSymVectorIteratorImpl, PointVectorIteratorImpl

public class BitVectorIteratorImpl
extends java.lang.Object
implements BitVectorIterator

BitVectorIteratorImpl class: (##6)


Constructor Summary
BitVectorIteratorImpl(BitVector pBitVector)
           
 
Method Summary
 int currentIndex()
          Returns the current index of bit position.
 boolean hasNext()
          hasNext: Sees whether the BitVector associated with this BitVectorIterator has more elements.
 int next()
          Returns the next bit position of this BitVectorIterator.
 int nextIndex()
          nextIndex: Returns the next index of bit position that has value 1.
 void resetBit()
          Resets the bit for the position returned by the last call to next() or nextIndex().
 void setBit()
          Sets the bit for the position returned by the last call to next() or nextIndex().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BitVectorIteratorImpl

public BitVectorIteratorImpl(BitVector pBitVector)
Method Detail

hasNext

public boolean hasNext()
Description copied from interface: BitVectorIterator
hasNext: Sees whether the BitVector associated with this BitVectorIterator has more elements. This method does not check the contents of the remaining bits.

Specified by:
hasNext in interface BitVectorIterator
Returns:
true if the vector has next element, false otherwise.

next

public int next()
Description copied from interface: BitVectorIterator
Returns the next bit position of this BitVectorIterator.

Specified by:
next in interface BitVectorIterator

nextIndex

public int nextIndex()
Description copied from interface: BitVectorIterator
nextIndex: Returns the next index of bit position that has value 1. If the there is no non-zero bit remaining, then 0 is returned. Therefore, having hasNext returned true does not guarantee this method returns meaningful (nonzero) value.

Specified by:
nextIndex in interface BitVectorIterator

currentIndex

public int currentIndex()
Description copied from interface: BitVectorIterator
Returns the current index of bit position. This is what was last returned by next() or nextIndex().

Specified by:
currentIndex in interface BitVectorIterator

resetBit

public void resetBit()
Description copied from interface: BitVectorIterator
Resets the bit for the position returned by the last call to next() or nextIndex(). The behavior is undefined if there was no such call or the call returned 0.

Specified by:
resetBit in interface BitVectorIterator

setBit

public void setBit()
Description copied from interface: BitVectorIterator
Sets the bit for the position returned by the last call to next() or nextIndex(). The behavior is undefined if there was no such call or the call returned 0.

Specified by:
setBit in interface BitVectorIterator