redis.clients.jedis.search.querybuilder.DisjunctNode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jedis_preview Show documentation
Show all versions of jedis_preview Show documentation
Jedis is a blazingly small and sane Redis java client.
The newest version!
package redis.clients.jedis.search.querybuilder;
/**
* A disjunct node. evaluates to true if any of its children are false. Conversely, this node
* evaluates to false only iff all of its children are true, making it the exact inverse of
* {@link IntersectNode}
*
* In RS, it looks like:
*
* {@code -(@f1:v1 @f2:v2)}
*
* @see DisjunctUnionNode which evalutes to true if all its children are false.
*/
public class DisjunctNode extends IntersectNode {
@Override
public String toString(Parenthesize mode) {
String ret = super.toString(Parenthesize.NEVER);
if (shouldParenthesize(mode)) {
return "-(" + ret + ")";
} else {
return "-" + ret;
}
}
}