/** {@inheritDoc} */
 @Override
 public String toString() {
   final StringBuilder buf = new StringBuilder("{");
   for (int i = 0, end = _pos - 1; i < end; i++) {
     buf.append(_data.get(i));
     buf.append(", ");
   }
   if (size() > 0) {
     buf.append(_data.get(_pos - 1));
   }
   buf.append("}");
   return buf.toString();
 }
예제 #2
0
  /** {@inheritDoc} */
  @Override
  public String toString() {
    final StringBuilder buf = new StringBuilder("{");
    forEachEntry(
        new TIntIntProcedure() {
          private boolean first = true;

          public boolean execute(int key, int value) {
            if (first) first = false;
            else buf.append(", ");

            buf.append(key);
            buf.append("=");
            buf.append(value);
            return true;
          }
        });
    buf.append("}");
    return buf.toString();
  }
    /** {@inheritDoc} */
    @Override
    public String toString() {
      final StringBuilder buf = new StringBuilder("{");
      forEachValue(
          new TShortProcedure() {
            private boolean first = true;

            public boolean execute(short value) {
              if (first) {
                first = false;
              } else {
                buf.append(", ");
              }

              buf.append(value);
              return true;
            }
          });
      buf.append("}");
      return buf.toString();
    }
    @Override
    public String toString() {
      final StringBuilder buf = new StringBuilder("{");
      forEachKey(
          new TByteProcedure() {
            private boolean first = true;

            public boolean execute(byte key) {
              if (first) {
                first = false;
              } else {
                buf.append(", ");
              }

              buf.append(key);
              return true;
            }
          });
      buf.append("}");
      return buf.toString();
    }