MCPcopy
hub / github.com/OpenTSDB/opentsdb / toString

Method toString

src/utils/ByteSet.java:90–107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

88 }
89
90 @Override
91 public String toString() {
92 final Iterator<byte[]> it = map.keySet().iterator();
93 if (!it.hasNext()) {
94 return "[]";
95 }
96
97 final StringBuilder buf = new StringBuilder();
98 buf.append('[');
99 for (;;) {
100 final byte[] array = it.next();
101 buf.append(Arrays.toString(array));
102 if (!it.hasNext()) {
103 return buf.append(']').toString();
104 }
105 buf.append(',');
106 }
107 }
108
109 // TODO - writeObject, readObject
110}

Callers 1

goodOperationsMethod · 0.95

Calls 4

iteratorMethod · 0.65
hasNextMethod · 0.65
nextMethod · 0.65
appendMethod · 0.45

Tested by 1

goodOperationsMethod · 0.76