/** * @param right * @return */ public BooleanExpression eqAny(CollectionExpression<?, ? super T> right) { return eq(ExpressionUtils.any(right)); }
/** * @param right * @return */ public BooleanExpression eqAll(CollectionExpression<?, ? super T> right) { return eq(ExpressionUtils.all(right)); }
@SuppressWarnings("unchecked") public final BooleanExpression contains(Expression<K> key, Expression<V> value) { return get(key).eq((Expression)value); }
public final BooleanExpression contains(K key, V value) { return get(key).eq(value); }
public BooleanExpression eq(Expression<A> expr) { return getValue().eq(expr); }
public BooleanExpression eq(A arg) { return getValue().eq(arg); }
/** * Get a {@code this == right} expression * * <p>Use expr.isNull() instead of expr.eq(null)</p> * * @param right rhs of the comparison * @return */ public BooleanExpression eq(T right) { if (right == null) { throw new IllegalArgumentException("eq(null) is not allowed. Use isNull() instead"); } else { return eq(ConstantImpl.create(right)); } }
/** * Get a {@code this in right} expression * * @param right rhs of the comparison * @return */ public BooleanExpression in(Collection<? extends T> right) { if (right.size() == 1) { return eq(right.iterator().next()); } else { return BooleanOperation.create(Ops.IN, mixin, ConstantImpl.create(right)); } }
/** * Get a {@code this in right} expression * * @param right rhs of the comparison * @return */ public BooleanExpression in(T... right) { if (right.length == 1) { return eq(right[0]); } else { return BooleanOperation.create(Ops.IN, mixin, ConstantImpl.create(ImmutableList.copyOf(right))); } }