@Test public void flatMap() throws Exception { SegmentReader<Integer> reader = SegmentReader.of(0) .flatMap((v) -> readerImpl); assertEquals(new Integer(EXPECTED), reader.decode()); }
@Override public U decode() throws IOException, OncRpcException { return fn.apply(in.decode()); }
MappedSegmentReader implements SegmentReader<U> { @Override public U decode() throws IOException, OncRpcException { return fn.apply(in.decode()); } }
MappedSegmentReader implements SegmentReader<U> { @Override public U decode() throws IOException, OncRpcException { return fn.apply(in.decode()); }  }
MappedSegmentReader implements SegmentReader<U> { @Override public U decode() throws IOException, OncRpcException { return fn.apply(in.decode()); }  @Override U decode(); }
MappedSegmentReader implements SegmentReader<U> { @Override public U decode() throws IOException, OncRpcException { return fn.apply(in.decode()); }  @Override U decode();  }