run.halo.app.extension.index.query.Or Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api Show documentation
Show all versions of api Show documentation
API of halo project, connecting by other projects.
The newest version!
package run.halo.app.extension.index.query;
import com.google.common.collect.Sets;
import java.util.Collection;
import java.util.NavigableSet;
import java.util.stream.Collectors;
public class Or extends LogicalQuery {
public Or(Collection childQueries) {
super(childQueries);
}
@Override
public NavigableSet matches(QueryIndexView indexView) {
var resultSet = Sets.newTreeSet();
for (Query query : childQueries) {
resultSet.addAll(query.matches(indexView));
}
return resultSet;
}
@Override
public String toString() {
return "(" + childQueries.stream().map(Query::toString)
.collect(Collectors.joining(" OR ")) + ")";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy