Ejemplo n.º 1
0
 @Override
 public void setMyLevels(String levels) {
   if ((levels.length() == 0) && (myClasses != null) && (myClasses.length > 0)) levels = "0";
   int x = levels.indexOf(';');
   final ArrayList<Integer> levelV = new ArrayList<Integer>();
   while (x >= 0) {
     final String theLevel = levels.substring(0, x).trim();
     levels = levels.substring(x + 1);
     if (theLevel.length() > 0) levelV.add(Integer.valueOf(CMath.s_int(theLevel)));
     x = levels.indexOf(';');
   }
   if (levels.trim().length() > 0) levelV.add(Integer.valueOf(CMath.s_int(levels)));
   myLevels = levelV.toArray(new Integer[0]);
 }
Ejemplo n.º 2
0
 @Override
 public void setMyClasses(String classes) {
   int x = classes.indexOf(';');
   final ArrayList<CharClass> classV = new ArrayList<CharClass>();
   CharClass C = null;
   while (x >= 0) {
     final String theClass = classes.substring(0, x).trim();
     classes = classes.substring(x + 1);
     if (theClass.length() > 0) {
       C = CMClass.getCharClass(theClass);
       if (C == null) C = CMClass.getCharClass("StdCharClass");
       classV.add(C);
     }
     x = classes.indexOf(';');
   }
   if (classes.trim().length() > 0) {
     C = CMClass.getCharClass(classes.trim());
     if (C == null) C = CMClass.getCharClass("StdCharClass");
     classV.add(C);
   }
   myClasses = classV.toArray(new CharClass[0]);
 }