public final class BooleanBuilder extends Object implements Predicate, Cloneable
BooleanBuilder is a cascading builder for Predicate expressions.
BooleanBuilder is a mutable Expression implementation.
Usage example:
QEmployee employee = QEmployee.employee;
BooleanBuilder builder = new BooleanBuilder();
for (String name : names) {
builder.or(employee.name.equalsIgnoreCase(name));
}
| Constructor and Description |
|---|
BooleanBuilder()
Create an empty BooleanBuilder
|
BooleanBuilder(Predicate initial)
Create a BooleanBuilder with the given initial value
|
| Modifier and Type | Method and Description |
|---|---|
<R,C> R |
accept(Visitor<R,C> v,
C context)
Accept the visitor with the given context
|
BooleanBuilder |
and(Predicate right)
Create the intersection of this and the given predicate
|
BooleanBuilder |
andAnyOf(Predicate... args)
Create the intersection of this and the union of the given args
{@code (this && (arg1 || arg2 ...
|
BooleanBuilder |
andNot(Predicate right)
Create the insertion of this and the negation of the given predicate
|
BooleanBuilder |
clone() |
boolean |
equals(Object o) |
Class<? extends Boolean> |
getType()
Get the java type for this expression
|
Predicate |
getValue() |
int |
hashCode() |
boolean |
hasValue()
Returns true if the value is set, and false, if not
|
BooleanBuilder |
not()
Get the negation of the expression
|
BooleanBuilder |
or(Predicate right)
Create the union of this and the given predicate
|
BooleanBuilder |
orAllOf(Predicate... args)
Create the union of this and the intersection of the given args
{@code (this || (arg1 && arg2 ...
|
BooleanBuilder |
orNot(Predicate right)
Create the union of this and the negation of the given predicate
|
String |
toString() |
public BooleanBuilder()
public BooleanBuilder(Predicate initial)
initial - initial valuepublic <R,C> R accept(Visitor<R,C> v, C context)
Expressionaccept in interface Expression<Boolean>R - return typeC - context typev - visitorcontext - context of visitpublic BooleanBuilder and(@Nullable Predicate right)
right - right hand side of and operationpublic BooleanBuilder andAnyOf(Predicate... args)
(this && (arg1 || arg2 ... || argN))args - union of predicatespublic BooleanBuilder andNot(Predicate right)
right - predicate to be negatedpublic BooleanBuilder clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic boolean hasValue()
public BooleanBuilder not()
Predicatepublic BooleanBuilder or(@Nullable Predicate right)
right - right hand side of or operationpublic BooleanBuilder orAllOf(Predicate... args)
(this || (arg1 && arg2 ... && argN))args - intersection of predicatespublic BooleanBuilder orNot(Predicate right)
right - predicate to be negatedpublic Class<? extends Boolean> getType()
ExpressiongetType in interface Expression<Boolean>Copyright © 2007–2019 Querydsl. All rights reserved.