1 2 package SOFA.SOFAnode.Made.CDL; 3 4 5 class EnumList extends List { 6 public EnumList() { super(); } 7 public boolean addName(String what) { 8 akt = first; 9 for (int i=0;i<count;i++) { 10 if (what.compareTo(((String )akt.item))==0) 11 return false; 12 toNext(); 13 } 14 add(what); 15 return true; 16 } 17 18 public boolean isIn(String what) { 19 akt = first; 20 for (int i=0;i<count;i++) { 21 if (what.compareTo(((String )akt.item))==0) 22 return true; 23 toNext(); 24 } 25 return false; 26 } 27 28 public String [] toArray() { 29 String [] ret = new String [count]; 30 toFirst(); 31 for (int i=0;i<count;i++) { 32 ret[i] = new String ((String ) aktual()); 33 toNext(); 34 } 35 return ret; 36 } 37 } 38 | Popular Tags |