Interface GraphReader

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable
    All Known Implementing Classes:
    BinaryGraphReader

    public interface GraphReader
    extends java.lang.AutoCloseable, java.io.Closeable
    Base interface for classes that can read graph.
    • Method Detail

      • addObserver

        void addObserver​(GraphReaderObserver observer)
        Add a new observer to this graph reader.
        Parameters:
        observer - Observer to add.
      • read

        Graph read()
            throws java.io.IOException
        Read a graph an returns it.
        Returns:
        The graph read.
        Throws:
        java.io.IOException - if an exception occurs while reading the graph.
      • close

        void close()
            throws java.io.IOException
        Close this graph reader.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException - if an exception occurs while closing the reader.