public abstract class OrdinalSet
extends java.lang.Object
OrdinalSet is the interface used to represent a set of connections.
An OrdinalSet is obtained directly from an NFGraph.
NFGraph| Modifier and Type | Field and Description |
|---|---|
static OrdinalSet |
EMPTY_SET
An empty
OrdinalSet. |
| Constructor and Description |
|---|
OrdinalSet() |
| Modifier and Type | Method and Description |
|---|---|
int[] |
asArray()
Returns an array containing all elements in the set.
|
abstract boolean |
contains(int value)
Returns
true when the specified value is contained in this set. |
boolean |
containsAll(int... values)
Returns
true when all specified values are contained in this set. |
abstract OrdinalIterator |
iterator() |
abstract int |
size() |
public static final OrdinalSet EMPTY_SET
OrdinalSet.public abstract boolean contains(int value)
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
public boolean containsAll(int... values)
true when all specified values are contained in this set. Depending on the implementation,
this operation will have one of two performance characteristics:
O(m) for HashSetOrdinalSet and BitSetOrdinalSet, where m is the number of specified elements.
O(n) for CompactOrdinalSet, where n is the number of elements in the set.
O(n * m) for NFBuildGraphOrdinalSet.
public int[] asArray()
public abstract OrdinalIterator iterator()
OrdinalIterator over this set.public abstract int size()