@Test public void filter() throws Exception { assertEquals(Optional.of(170), SegmentReader.of(170).filter(x -> true).decode()); assertEquals(Optional.empty(), SegmentReader.of(170).filter(x -> false).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();  }