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 Detail

      • attachObserver

        void attachObserver​(IGraphObserver<V> observer)
        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

        void attachAsFirstObserver​(IGraphObserver<V> observer)
        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

        void detachObserver​(IGraphObserver<V> observer)
        Detaches an already registered graph observer from this graph data source.
        Parameters:
        observer - the graph observer
      • getAllNodes

        java.util.Set<V> getAllNodes()
        Returns the complete set of nodes in the graph data source.
        Returns:
        the set of all nodes
      • getTargetNodes

        IMemoryView<V> getTargetNodes​(V source)
        Returns the target nodes for the given source node. The returned data structure is an IMultiset 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