class ConfigReader implements Closeable {

    public Config read() {
        Verify.isFalse(closed, () -> new IllegalStateException("ConfigReader has been closed."));

        Config config = new Config();

        previousNode = config;
        parent = config;

        while (scanner.hasNextLine()) {
            String line = readNewLine();
            String trimmed = line.trim();
            handleLine(line, trimmed);
        }

        return config;
    }

    public  ConfigReader(Path filePath);
    public  ConfigReader(InputStream in);
    public  ConfigReader(BufferedReader bufferedReader);
    public  ConfigReader(Scanner scanner);

}