MCPcopy Index your code
hub / github.com/OpenTSDB/asynchbase / toString

Method toString

src/Bytes.java:634–655  ·  view source on GitHub ↗

byte[] friendly implementation.

()

Source from the content-addressed store, hash-verified

632
633 /** {@code byte[]} friendly implementation. */
634 public String toString() {
635 final int size = size();
636 if (size == 0) {
637 return "{}";
638 }
639 final StringBuilder buf = new StringBuilder(size << 4);
640 buf.append('{');
641 for (final Map.Entry<byte[], V> e : this) {
642 Bytes.pretty(buf, e.getKey());
643 buf.append('=');
644 final V value = e.getValue();
645 if (value instanceof byte[]) {
646 Bytes.pretty(buf, (byte[]) value);
647 } else {
648 buf.append(value == this ? "(this map)" : value);
649 }
650 buf.append(", ");
651 }
652 buf.setLength(buf.length() - 2); // Remove the extra ", ".
653 buf.append('}');
654 return buf.toString();
655 }
656
657 private static final long serialVersionUID = 1280744742;
658

Callers 1

prettyMethod · 0.45

Calls 3

prettyMethod · 0.95
appendMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected