1 17 package org.apache.bcel.verifier.statics; 18 19 20 import java.util.ArrayList ; 21 import java.util.List ; 22 23 29 public class IntList{ 30 31 private List theList; 32 33 IntList(){ 34 theList = new ArrayList (); 35 } 36 37 void add(int i){ 38 theList.add(new Integer (i)); 39 } 40 41 boolean contains(int i){ 42 Integer [] ints = new Integer [theList.size()]; 43 theList.toArray(ints); 44 for (int j=0; j<ints.length; j++){ 45 if (i == ints[j].intValue()) { 46 return true; 47 } 48 } 49 return false; 50 } 51 } 52 | Popular Tags |