All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.sdk.queries.ContainsAnyPredicate Maven / Gradle / Ivy

The newest version!
package io.sphere.sdk.queries;

import java.util.StringJoiner;

import static io.sphere.sdk.utils.SphereInternalUtils.requireNonEmpty;

final class ContainsAnyPredicate extends QueryModelQueryPredicate {
    private final Iterable values;

    public ContainsAnyPredicate(final QueryModel queryModel, final Iterable values) {
        super(queryModel);
        requireNonEmpty(values);
        this.values = values;
    }

    @Override
    protected String render() {
        final StringJoiner joiner = new StringJoiner(", ");
        values.forEach(x -> joiner.add(x.toString()));
        return " contains any (" + joiner.toString() + ")";
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy