01: /* Generated By:JJTree: Do not edit this line. AstLessThanEqual.java */
02:
03: package org.apache.el.parser;
04:
05: import javax.el.ELException;
06:
07: import org.apache.el.lang.EvaluationContext;
08:
09: /**
10: * @author Jacob Hookom [jacob@hookom.net]
11: * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: markt $
12: */
13: public final class AstLessThanEqual extends BooleanNode {
14: public AstLessThanEqual(int id) {
15: super (id);
16: }
17:
18: public Object getValue(EvaluationContext ctx) throws ELException {
19: Object obj0 = this .children[0].getValue(ctx);
20: Object obj1 = this .children[1].getValue(ctx);
21: if (obj0 == obj1) {
22: return Boolean.TRUE;
23: }
24: if (obj0 == null || obj1 == null) {
25: return Boolean.FALSE;
26: }
27: return (compare(obj0, obj1) <= 0) ? Boolean.TRUE
28: : Boolean.FALSE;
29: }
30: }
|