1 26 27 package org.objectweb.openccm.ast.lib; 28 29 44 45 public class StringListImpl 46 extends ListBaseImpl 47 implements org.objectweb.openccm.ast.api.StringList 48 { 49 55 61 64 public 65 StringListImpl() 66 { 67 super(); 69 } 70 71 77 83 public int 84 checkSameItem() 85 { 86 for(int i=0; i<getSize(); i++) 87 { 88 String s1 = (String )get(i); 89 90 for(int j=i+1; j<getSize(); j++) 91 { 92 String s2 = (String )get(j); 93 94 if( s1.compareTo(s2) == 0 ) 95 return i; 96 } 97 } 98 return -1; 99 } 100 101 107 113 119 124 public void 125 add(String s) 126 { 127 super.addObject(s); 128 } 129 130 135 public String [] 136 getStrings() 137 { 138 return (String [])super.toArray(new String [0]); 139 } 140 } 141 | Popular Tags |