Interface IGraphDataSource<V>
- Type Parameters:
V
- the type of the nodes in the graph
- All Known Subinterfaces:
IBiDirectionalGraphDataSource<V>
- All Known Implementing Classes:
Graph
,IBiDirectionalWrapper
public interface IGraphDataSource<V>
The interface prescribes the set of operations that a graph data source must support.
Note that the old version of the interface is broken at version 1.6; MultiSets are now presented as Maps instead of Lists.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
attachAsFirstObserver
(IGraphObserver<V> observer) Attaches a new graph observer to this graph data source as the first one.void
attachObserver
(IGraphObserver<V> observer) Attaches a new graph observer to this graph data source.void
detachObserver
(IGraphObserver<V> observer) Detaches an already registered graph observer from this graph data source.Returns the complete set of nodes in the graph data source.getTargetNodes
(V source) Returns the target nodes for the given source node.
-
Method Details
-
attachObserver
Attaches a new graph observer to this graph data source. Observers will be notified in the order they have been registered.- Parameters:
observer
- the graph observer
-
attachAsFirstObserver
Attaches a new graph observer to this graph data source as the first one. In the notification order this observer will be the first one as long as another call to this method happens.- Parameters:
observer
- the graph observer- Since:
- 1.6
-
detachObserver
Detaches an already registered graph observer from this graph data source.- Parameters:
observer
- the graph observer
-
getAllNodes
Returns the complete set of nodes in the graph data source.- Returns:
- the set of all nodes
-
getTargetNodes
Returns the target nodes for the given source node. The returned data structure is anIMultiset
because of potential parallel edges in the graph data source. The method must not return null.- Parameters:
source
- the source node- Returns:
- the multiset of target nodes
- Since:
- 2.0
-