interface EdgeGraphSorted.NonEmpty<N>
A non-empty type-invariant immutable valued edge (undirected) graph. The connections are internally maintained using sorted collections See the Graph documentation and the EdgeGraphSorted API documentation
Extends: Streamable.NonEmpty<T>, EdgeGraphSorted<N>
Type parameters
| Name | Description |
|---|---|
| N | the node type |
Methods
stream
Returns a non-empty Stream containing all graph elements of this collection as single tuples for isolated nodes and 2-valued tuples of nodes for connections.
streamStream containing all graph elements of this collection as single tuples for isolated nodes and 2-valued tuples of nodes for connections.Definition
stream(): Stream.NonEmpty<GraphElement<N>>;
example
EdgeGraphSorted.of([1], [2, 3]).stream().toArray() // => [[1], [2, 3]]