Interface GraphImporter<V,​E>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default void importGraph​(org.jgrapht.Graph<V,​E> g, java.io.File file)
      Import a graph from the given File.
      default void importGraph​(org.jgrapht.Graph<V,​E> g, java.io.InputStream in)
      Import a graph from the given InputStream.
      void importGraph​(org.jgrapht.Graph<V,​E> g, java.io.Reader in)
      Import a graph using the given Reader.
    • Method Detail

      • importGraph

        default void importGraph​(org.jgrapht.Graph<V,​E> g,
                                 java.io.InputStream in)
        Import a graph from the given InputStream.

        It is the callers responsibility to ensure the InputStream is closed after this method returned.

        Parameters:
        g - the graph
        in - the input stream
        Throws:
        ImportException - in case any error occurs, such as I/O or parse error
      • importGraph

        void importGraph​(org.jgrapht.Graph<V,​E> g,
                         java.io.Reader in)
        Import a graph using the given Reader.

        It is the callers responsibility to ensure the Reader is closed after this method returned.

        Parameters:
        g - the graph
        in - the input reader
        Throws:
        ImportException - in case any error occurs, such as I/O or parse error
      • importGraph

        default void importGraph​(org.jgrapht.Graph<V,​E> g,
                                 java.io.File file)
        Import a graph from the given File.
        Parameters:
        g - the graph
        file - the file to read from
        Throws:
        ImportException - in case any error occurs, such as I/O or parse error