My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.vineetmanohar.util;

import java.util.Map;

public class Add extends ELMethod {
private static final long serialVersionUID = 1L;

public Add() {
super(2);
}

public Object result(Object... args) {
double total = 0;
for (Object arg : args) {
Number number = (Number) arg;
total += number.doubleValue();
}

return total;
}

public static void main(String[] args) {
Add add = new Add();

Object res1 = add.get(1);
Map map1 = (Map) res1;
Object res2 = map1.get(2);

System.out.print(res2);
}
}

Change log

r12 by vineet.manohar on Jul 13, 2010   Diff
added el method an example child classes
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 536 bytes, 31 lines
Powered by Google Project Hosting