code: public static Collector<Quad, ?, Dataset> toDataset() {
          return of(rdf::createDataset, Dataset::add, (left, right) -> {
              right.iterate().forEach(left::add);
              return left;
          }, UNORDERED);
      }
docs: Collect a stream of Quads into a Dataset
  @return a dataset