/** * Is the value 'false' (either set to the string "false" or Boolean.FALSE) * or undefined */ public boolean isFalseOrUndef(Symbol property) { return isFalse(property, true) ; }
@Test public void testCxt5() { Context cxt = new Context() ; cxt.set(p1, "false") ; assertTrue("Not false", cxt.isFalse(p1)) ; assertTrue("Not false or undef", cxt.isFalseOrUndef(p1)) ; }
@Test public void testCxt4() { Context cxt = new Context() ; cxt.set(p1, "true") ; assertTrue("Not true", cxt.isTrue(p1)) ; assertTrue("Not true or undef", cxt.isTrueOrUndef(p1)) ; assertTrue("Not false or undef", cxt.isFalseOrUndef(p2)) ; assertTrue("False when undef", !cxt.isFalse(p2)) ; }
/** Is the value 'false' (either set to the string "false" or Boolean.FALSE) */ public boolean isFalse(Symbol property) { return isFalse(property, false) ; }
public static boolean isFalse(Symbol symbol) { return getContext().isFalse(symbol) ; } public static boolean isTrueOrUndef(Symbol symbol) { return getContext().isTrueOrUndef(symbol) ; }
public QueryIterService(QueryIterator input, OpService opService, ExecutionContext context) { super(input, context) ; if ( context.getContext().isFalse(Service.serviceAllowed) ) throw new QueryExecException("SERVICE not allowed") ; this.opService = opService ; }
@Override protected Op modifyOp(Op op) { if ( context.isFalse(ARQ.optimization) ) return minimalModifyOp(op) ; return Algebra.optimize(op, super.context) ; }
if ( context != null && context.isFalse(serviceAllowed) ) throw new QueryExecException("SERVICE execution disabled") ;