coins.aflow.util
インタフェース BitVectorIterator

既知のサブインタフェースの一覧:
DefVectorIterator, ExpVectorIterator, FlowAnalSymVectorIterator, PointVectorIterator
既知の実装クラスの一覧:
BitVectorIteratorImpl, DefVectorIteratorImpl, ExpVectorIteratorImpl, FlowAnalSymVectorIteratorImpl, PointVectorIteratorImpl

public interface BitVectorIterator

BitVectorIterator interface: (##6)


メソッドの概要
 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().
 

メソッドの詳細

hasNext

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

戻り値:
true if the vector has next element, false otherwise.

next

public int next()
Returns the next bit position of this BitVectorIterator.


nextIndex

public int nextIndex()
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.


currentIndex

public int currentIndex()
Returns the current index of bit position. This is what was last returned by next() or nextIndex().


setBit

public void setBit()
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.


resetBit

public void resetBit()
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.