class GraphEmpty<N,V,Tp,TpG>
undocumented
Extends: GraphEmptyBase
Implements: GraphBase<N,Tp>
Type parameters
| Name | Constraints | Default | Description |
|---|---|---|---|
| N | undocumented | ||
| V | undocumented | ||
| Tp | GraphTypesContextImpl | undocumented | |
| TpG | WithGraphValues<Tp, N, V> | WithGraphValues<Tp, N, V> | undocumented |
Properties
_NonEmptyType
undocumented
_NonEmptyTypeconnectionSize
undocumented
connectionSizeDefinition
get connectionSize(): 0;
Overrides
GraphEmptyBase.connectionSizeVariantGraphBase.connectionSize
context
undocumented
contextisDirected
undocumented
isDirectedisEmpty
Returns true since the collection is empty.
isEmptytrue since the collection is empty.length
Returns 0 for the length of the collection.
length0 for the length of the collection.linkMap
undocumented
linkMapnodeSize
undocumented
nodeSizesize
Returns 0 for the size of the collection.
size0 for the size of the collection.Methods
[Symbol.iterator]
Returns an empty iterator.
[Symbol.iterator]addNode
undocumented
addNodeaddNodes
undocumented
addNodesDefinition
addNodes(nodes: StreamSource<N>): WithGraphValues<Tp, N, V>['nonEmpty'];
Parameters
| Name | Type | Description |
|---|---|---|
nodes | StreamSource<N> |
Overrides
assumeNonEmpty
Throws a RimbuError.EmptyCollectionAssumedNonEmptyError, since the collection is empty.
assumeNonEmptyRimbuError.EmptyCollectionAssumedNonEmptyError, since the collection is empty.connect
undocumented
connectconnectAll
undocumented
connectAllDefinition
connectAll(links: StreamSource<WithGraphValues<Tp, N, V>['link']>): WithGraphValues<Tp, N, V>['nonEmpty'];
Parameters
| Name | Type | Description |
|---|---|---|
links | StreamSource<WithGraphValues<Tp, N, V>['link']> |
Overrides
disconnect
undocumented
disconnectdisconnectAll
undocumented
disconnectAllDefinition
disconnectAll(): any;
Overrides
GraphEmptyBase.disconnectAll, VariantGraphBase.disconnectAll
filter
Returns this, since filtering an empty collection is still empty.
filterthis, since filtering an empty collection is still empty.forEach
Performs no action, since there are no elements.
forEachgetConnectionsFrom
undocumented
getConnectionsFromgetConnectionStreamFrom
undocumented
getConnectionStreamFromDefinition
getConnectionStreamFrom(): Stream<any>;
Overrides
GraphEmptyBase.getConnectionStreamFrom, VariantGraphBase.getConnectionStreamFrom
getConnectionStreamTo
undocumented
getConnectionStreamToDefinition
getConnectionStreamTo(): Stream<any>;
Overrides
GraphEmptyBase.getConnectionStreamTo, VariantGraphBase.getConnectionStreamTo
hasConnection
undocumented
hasConnectionDefinition
hasConnection(): false;
Overrides
GraphEmptyBase.hasConnection, VariantGraphBase.hasConnection
hasNode
undocumented
hasNodeisSink
undocumented
isSinkisSource
undocumented
isSourcenonEmpty
Returns false, keeping the type narrowed to the empty variant.
nonEmptyfalse, keeping the type narrowed to the empty variant.remove
Returns this, since removing from an empty collection has no effect.
removethis, since removing from an empty collection has no effect.removeNode
undocumented
removeNoderemoveNodes
undocumented
removeNodesremoveUnconnectedNodes
undocumented
removeUnconnectedNodesDefinition
removeUnconnectedNodes(): any;
Overrides
GraphEmptyBase.removeUnconnectedNodes, VariantGraphBase.removeUnconnectedNodes
stream
Returns an empty Stream.
streamStream.streamConnections
undocumented
streamConnectionsDefinition
streamConnections(): Stream<any>;
Overrides
GraphEmptyBase.streamConnections, VariantGraphBase.streamConnections
toArray
Returns an empty array.
toArraytoBuilder
undocumented
toBuildertoJSON
undocumented
toJSONtoString
undocumented
toString