1 package jfun.yan.xml; 2 3 10 public class SynchronizedNutsFunction 11 extends DelegatingNutsFunction { 12 13 17 public SynchronizedNutsFunction(NutsFunction fun) { 18 super(fun); 19 } 20 21 25 public synchronized Object call(Object [] args) { 26 return super.call(args); 27 } 28 29 public boolean equals(Object obj) { 30 if(obj instanceof SynchronizedNutsFunction){ 31 SynchronizedNutsFunction other = (SynchronizedNutsFunction)obj; 32 final NutsFunction fun = getDelegateTarget(); 33 final NutsFunction fun2 = other.getDelegateTarget(); 34 return fun==null?fun2==null:fun.equals(fun2); 35 } 36 else return false; 37 } 38 39 } 40 | Popular Tags |