Ejemplo n.º 1
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();
    }