com.netflix.nfgraph.build
Class NFBuildGraphOrdinalSet

java.lang.Object
  extended by com.netflix.nfgraph.OrdinalSet
      extended by com.netflix.nfgraph.build.NFBuildGraphOrdinalSet

public class NFBuildGraphOrdinalSet
extends OrdinalSet

And implementation of OrdinalSet returned for connections in an NFBuildGraph.


Field Summary
 
Fields inherited from class com.netflix.nfgraph.OrdinalSet
EMPTY_SET
 
Constructor Summary
NFBuildGraphOrdinalSet(int[] ordinals, int size)
           
 
Method Summary
 int[] asArray()
          Returns an array containing all elements in the set.
 boolean contains(int value)
          Returns true when the specified value is contained in this set.
 OrdinalIterator iterator()
          
 int size()
          
 
Methods inherited from class com.netflix.nfgraph.OrdinalSet
containsAll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NFBuildGraphOrdinalSet

public NFBuildGraphOrdinalSet(int[] ordinals,
                              int size)
Method Detail

contains

public boolean contains(int value)
Returns true when the specified value is contained in this set. Depending on the implementation, this operation will have one of two performance characteristics:

O(1) for HashSetOrdinalSet and BitSetOrdinalSet
O(n) for CompactOrdinalSet and NFBuildGraphOrdinalSet

Specified by:
contains in class OrdinalSet

asArray

public int[] asArray()
Returns an array containing all elements in the set.

Overrides:
asArray in class OrdinalSet

iterator

public OrdinalIterator iterator()

Specified by:
iterator in class OrdinalSet
Returns:
an OrdinalIterator over this set.

size

public int size()

Specified by:
size in class OrdinalSet
Returns:
the number of ordinals in this set.