InMemoryGraph class
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addNode(
Node node, {bool replaceIfExists = true}) → void -
Add a new node to graph
override
-
addRelation(
Relation relation, {bool replaceIfExists = true}) → void -
Add a new relation to the graph
override
-
allNodes(
) → Iterable< Node> -
Get all nodes.
override
-
allRelations(
) → Iterable< Relation> -
Get all relations.
override
-
clear(
) → void -
Clear the graph.
This removes all nodes and relations from the graph.
override
-
getNode(
String nodeId) → Node -
Get node (by id)
override
-
getRelation(
String relationId) → Relation -
Get a relation (by id)
override
-
getRelationsBetween(
String fromNodeId, String toNodeId, {bool bothDirections = true}) → Iterable< Relation> -
Get relations from a given node to another (by id)
override
-
getRelationsFrom(
String nodeId) → Iterable< Relation> -
Get relations starting from this node
override
-
getRelationsTo(
String nodeId) → Iterable< Relation> -
Get relations ending at this node
override
-
nodeDoesNotExist(
String nodeId) → bool -
Opposite of nodeDoesNotExist
inherited
-
nodeExists(
String nodeId) → bool -
Check if a node exists (by id)
override
-
nodeIsConnected(
String nodeId) → bool -
Check if a Node has at least one Relation to or from it.
override
-
nodeIsDisconnected(
String nodeId) → bool -
Opposite of nodeIsConnected
inherited
-
nodeIsLeaf(
String nodeId) → bool -
Check if a Node has at least one Relation to it, but none from it.
override
-
nodeIsNotLeaf(
String nodeId) → bool -
Opposite of nodeIsLeaf
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
relationExists(
String relationId) → bool -
Check if a relation exists (by id)
override
-
removeNode(
String nodeId) → void -
Remove a node from the graph (by id)
override
-
removeRelation(
String relationId) → void -
Remove a relation (by id)
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited