1 17 18 package org.objectweb.jac.util; 19 20 import java.util.Arrays ; 21 22 23 27 28 public class ObjectArray { 29 Object [] args; 30 public ObjectArray(Object [] args) { 31 this.args = args; 32 } 33 public Object [] getArray() { 34 return args; 35 } 36 public int hashCode() { 37 int result = 0; 38 for (int i=args.length-1; i>=0; i--) { 39 if (args[i]!=null) 40 result = result ^ args[i].hashCode(); 41 } 42 return result; 43 } 44 public boolean equals(Object o) { 45 return (o instanceof ObjectArray) 46 && Arrays.equals(((ObjectArray)o).args,args); 47 } 48 public String toString() { 49 return Arrays.asList(args).toString(); 50 } 51 } 52 | Popular Tags |