Esempio n. 1
0
 public static String PrintList(ArrayList l) {
   StringBuffer sb = new StringBuffer("[ ");
   Iterator i = l.iterator();
   while (i.hasNext()) {
     Double d = (Double) i.next();
     sb.append(MDP._df.format(d.doubleValue()) + " ");
   }
   sb.append("]");
   return sb.toString();
 }
Esempio n. 2
0
 public static String PrintState(ArrayList state) {
   StringBuffer sb = new StringBuffer();
   Iterator i = state.iterator();
   while (i.hasNext()) {
     Object o = i.next();
     if (o instanceof Boolean) {
       Boolean val = (Boolean) o;
       sb.append((val.booleanValue() ? "." : "X"));
     }
   }
   return sb.toString();
 }