1 package com.sun.org.apache.bcel.internal.verifier.statics; 2 3 56 57 import java.util.ArrayList ; 58 59 65 public class IntList{ 66 67 private ArrayList theList; 68 69 IntList(){ 70 theList = new ArrayList (); 71 } 72 73 void add(int i){ 74 theList.add(new Integer (i)); 75 } 76 77 boolean contains(int i){ 78 Integer [] ints = new Integer [theList.size()]; 79 theList.toArray(ints); 80 for (int j=0; j<ints.length; j++){ 81 if (i == ints[j].intValue()) return true; 82 } 83 return false; 84 } 85 } 86 | Popular Tags |