@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]); }
/*public int numTickGroups() { return ticks.size(); }*/ public String[][] threadInfo() { ArrayList<String[]> V = new ArrayList(); for (Iterator<CMLibrary> e = CMLib.libraries(); e.hasNext(); ) { CMLibrary lib = e.next(); SupportThread thread = lib.getSupportThread(); if (thread != null) { String[] S = new String[3]; S[0] = thread.getName(); S[1] = CMLib.english().returnTime(thread.milliTotal, thread.tickTotal); S[2] = thread.status; V.add(S); } } return V.toArray(new String[V.size()][]); }
@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]); }