Package org.insa.graphs.model.io
Interface GraphReader
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable
- All Known Implementing Classes:
BinaryGraphReader
public interface GraphReader extends java.lang.AutoCloseable, java.io.CloseableBase interface for classes that can read graph.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddObserver(GraphReaderObserver observer)Add a new observer to this graph reader.voidclose()Close this graph reader.Graphread()Read a graph an returns it.
-
-
-
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.IOExceptionClose this graph reader.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException- if an exception occurs while closing the reader.
-
-