예제 #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();
  }
    @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();
    }
    /** {@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();
    }
예제 #4
0
 /** {@inheritDoc} */
 public String toString() {
   StringBuilder buffy = new StringBuilder(_size * 2 + 2);
   buffy.append("{");
   for (int i = _states.length, j = 1; i-- > 0; ) {
     if (_states[i] == FULL) {
       buffy.append(_set[i]);
       if (j++ < _size) {
         buffy.append(",");
       }
     }
   }
   buffy.append("}");
   return buffy.toString();
 }