io.sphere.sdk.queries.ContainsAllPredicate Maven / Gradle / Ivy
package io.sphere.sdk.queries;
import java.util.StringJoiner;
import static io.sphere.sdk.utils.IterableUtils.requireNonEmpty;
final class ContainsAllPredicate extends QueryModelQueryPredicate {
private final Iterable values;
public ContainsAllPredicate(final QueryModel queryModel, final Iterable values) {
super(queryModel);
requireNonEmpty(values);//SPHERE.IO requires values not to be empty
this.values = values;
}
@Override
protected String render() {
final StringJoiner joiner = new StringJoiner(", ");
values.forEach(x -> joiner.add(x.toString()));
return " contains all (" + joiner.toString() + ")";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy