KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > el > parser > AstLessThan


1 /* Generated By:JJTree: Do not edit this line. AstLessThan.java */
2
3 package org.apache.el.parser;
4
5 import javax.el.ELException;
6
7 import org.apache.el.lang.EvaluationContext;
8
9
10 /**
11  * @author Jacob Hookom [jacob@hookom.net]
12  * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: markt $
13  */

14 public final class AstLessThan extends BooleanNode {
15     public AstLessThan(int id) {
16         super(id);
17     }
18
19     public Object JavaDoc getValue(EvaluationContext ctx)
20             throws ELException {
21         Object JavaDoc obj0 = this.children[0].getValue(ctx);
22         if (obj0 == null) {
23             return Boolean.FALSE;
24         }
25         Object JavaDoc obj1 = this.children[1].getValue(ctx);
26         if (obj1 == null) {
27             return Boolean.FALSE;
28         }
29         return (compare(obj0, obj1) < 0) ? Boolean.TRUE : Boolean.FALSE;
30     }
31 }
32
Popular Tags