com.netflix.nfgraph.compressed
Class BitSetOrdinalIterator

java.lang.Object
  extended by com.netflix.nfgraph.compressed.BitSetOrdinalIterator
All Implemented Interfaces:
OrdinalIterator

public class BitSetOrdinalIterator
extends java.lang.Object
implements OrdinalIterator

An implementation of OrdinalIterator returned for ordinals represented as bit sets in an NFCompressedGraph.

See Also:
BitSetOrdinalSet

Field Summary
 int offset
           
 
Fields inherited from interface com.netflix.nfgraph.OrdinalIterator
EMPTY_ITERATOR, NO_MORE_ORDINALS
 
Constructor Summary
BitSetOrdinalIterator(com.netflix.nfgraph.util.ByteArrayReader reader)
           
 
Method Summary
 OrdinalIterator copy()
          Obtain a copy of this OrdinalIterator.
 boolean isOrdered()
           
 int nextOrdinal()
          
 void reset()
          Rewinds this OrdinalIterator to the beginning of the set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

offset

public int offset
Constructor Detail

BitSetOrdinalIterator

public BitSetOrdinalIterator(com.netflix.nfgraph.util.ByteArrayReader reader)
Method Detail

nextOrdinal

public int nextOrdinal()

Specified by:
nextOrdinal in interface OrdinalIterator
Returns:
the next ordinal in this set.

reset

public void reset()
Rewinds this OrdinalIterator to the beginning of the set.

Specified by:
reset in interface OrdinalIterator

copy

public OrdinalIterator copy()
Obtain a copy of this OrdinalIterator. The returned OrdinalIterator will be reset to the beginning of the set.

Specified by:
copy in interface OrdinalIterator

isOrdered

public boolean isOrdered()
Specified by:
isOrdered in interface OrdinalIterator
Returns:
true