Modifier and Type | Method and Description |
---|---|
Relationship |
addRelationship(Node source,
String relationship,
Node destination)
Creates a new
Relationship to this Graph
from the given node s and relationship String
representation. |
boolean |
addRelationship(Relationship relationship)
Adds the given
Relationship to this Graph. |
void |
clear()
Clear the graph by removing all its content.
|
Set<Relationship> |
getRelationships(Node node)
Returns a
Set containing all the relationship
in this Graph. |
Iterator<Node> |
iterator()
Returns an iterator over this graph nodes.
|
int |
order()
Returns the order, or the number of
Node s, of this Graph. |
int |
size()
Returns the size of this Graph.
|
forEach, spliterator
Relationship addRelationship(Node source, String relationship, Node destination)
Relationship
to this Graph
from the given node
s and relationship
String
representation.
Returns the Relationship
just created or null
if the
Relationship
was not added to the Graph.boolean addRelationship(Relationship relationship)
Relationship
to this Graph.
Returns true
if the operation was successful, false
otherwise.int size()
Relationship
s contained in the Graph, not the number of
Node
s. A Graph with size of zero may still
contain a number of not-connected Nodes. Such Graph is considered empty
and is referred to as Null-Graph or Edgeless.int order()
Node
s, of this Graph.
A Zero-Order Graph is an empty graph with no Nodes and no Relationships.Set<Relationship> getRelationships(Node node)
Set
containing all the relationship
in this Graph.Iterator<Node> iterator()
void clear()
Copyright © 2017. All rights reserved.