Constructor and Description |
---|
HashGraph() |
Modifier and Type | Method and Description |
---|---|
Relationship |
addRelationship(Node source,
String id,
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()
The iterator is not ordered.
|
int |
order()
Returns the order, or the number of
Node s, of this Graph. |
int |
size()
Returns the size of this Graph.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public Relationship addRelationship(Node source, String id, Node destination)
Graph
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.addRelationship
in interface Graph
public boolean addRelationship(Relationship relationship)
Graph
Relationship
to this Graph.
Returns true
if the operation was successful, false
otherwise.addRelationship
in interface Graph
public int size()
Graph
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.public int order()
Graph
Node
s, of this Graph.
A Zero-Order Graph is an empty graph with no Nodes and no Relationships.public Set<Relationship> getRelationships(Node node)
Graph
Set
containing all the relationship
in this Graph.getRelationships
in interface Graph
Copyright © 2017. All rights reserved.