MCPcopy Create free account
hub / github.com/GateNLP/gate-core / toString

Method toString

src/main/java/gate/util/Strings.java:187–197  ·  view source on GitHub ↗

Convert about any object to a human readable string. Use Arrays#deepToString(Object[]) to convert an array or a collection. @param object object to be converted to a string @return a string representation of the object, the empty string if null.

(Object object)

Source from the content-addressed store, hash-verified

185 * @return a string representation of the object, the empty string if null.
186 */
187 public static String toString(Object object) {
188 if (object == null) {
189 return "";
190 } else if (object instanceof Object[]) {
191 return Arrays.deepToString((Object[])object);
192 } else if (object instanceof Collection) {
193 return Arrays.deepToString(((Collection<?>)object).toArray());
194 } else {
195 return object.toString();
196 }
197 }
198
199 /**
200 * Create a String representation of a Set of String with the format

Callers 5

actionPerformedMethod · 0.95
drawStackMethod · 0.95
saveSettingsMethod · 0.95
putMethod · 0.95

Calls 7

toStringMethod · 0.65
deleteMethod · 0.65
getKeyMethod · 0.65
getValueMethod · 0.65
toArrayMethod · 0.45
lengthMethod · 0.45
entrySetMethod · 0.45

Tested by

no test coverage detected