Exemplo n.º 1
0
 // javadoc is inherited
 public String toString() {
   StringBuffer buf = new StringBuffer();
   buf.append("[");
   StoredIterator i = storedIterator();
   try {
     while (i.hasNext()) {
       Map.Entry entry = (Map.Entry) i.next();
       if (buf.length() > 1) buf.append(',');
       Object key = entry.getKey();
       Object val = entry.getValue();
       if (key != null) buf.append(key.toString());
       buf.append('=');
       if (val != null) buf.append(val.toString());
     }
     buf.append(']');
     return buf.toString();
   } finally {
     i.close();
   }
 }
Exemplo n.º 2
0
 // javadoc is inherited
 public String toString() {
   StringBuffer buf = new StringBuffer();
   buf.append("[");
   StoredIterator i = null;
   try {
     i = storedIterator();
     while (i.hasNext()) {
       Map.Entry entry = (Map.Entry) i.next();
       if (buf.length() > 1) buf.append(',');
       Object key = entry.getKey();
       Object val = entry.getValue();
       if (key != null) buf.append(key.toString());
       buf.append('=');
       if (val != null) buf.append(val.toString());
     }
     buf.append(']');
     return buf.toString();
   } catch (Exception e) {
     throw StoredContainer.convertException(e);
   } finally {
     StoredIterator.close(i);
   }
 }