default Mappings parse(Readable readable) throws IOException { LineReader lineReader = new LineReader(readable); LineProcessor<Mappings> lineProcessor = createLineProcessor(); String line; while ((line = lineReader.readLine()) != null) { if (!lineProcessor.processLine(line)) { break; } } return lineProcessor.getResult(); }
default Mappings parseLines(Iterator<String> lines) { LineProcessor<Mappings> lineProcessor = createLineProcessor(); lines.forEachRemaining(Exceptions.sneakyThrowing(lineProcessor::processLine)); return lineProcessor.getResult(); }