io.nosqlbench.nb.api.content.NBIORelativizer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of driver-cql-shaded Show documentation
Show all versions of driver-cql-shaded Show documentation
A Shaded CQL ActivityType driver for http://nosqlbench.io/
package io.nosqlbench.nb.api.content;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
public class NBIORelativizer {
public static List relativizePaths(Path base, List contained) {
List relativized = new ArrayList<>();
for (Path path : contained) {
Path relative = base.relativize(path);
relativized.add(relative);
}
return relativized;
}
public static List relativizeContent(Path base, List> contained) {
return relativizePaths(
base,
contained.stream().map(Content::asPath).collect(Collectors.toList()));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy