MCPcopy Index your code
hub / github.com/libgdx/libgdx / value

Method value

gdx/src/com/badlogic/gdx/utils/JsonString.java:77–89  ·  view source on GitHub ↗

Prefer calling the more specific value() methods.

(@Null Object value)

Source from the content-addressed store, hash-verified

75
76 /** Prefer calling the more specific value() methods. */
77 public JsonString value (@Null Object value) {
78 if (quoteLongValues
79 && (value instanceof Long || value instanceof Double || value instanceof BigDecimal || value instanceof BigInteger)) {
80 value = value.toString();
81 } else if (value instanceof Number) {
82 Number number = (Number)value;
83 long longValue = number.longValue();
84 if (number.doubleValue() == longValue) value = longValue;
85 }
86 requireCommaOrName();
87 buffer.append(outputType.quoteValue(value));
88 return this;
89 }
90
91 public JsonString value (String value) {
92 requireCommaOrName();

Callers 3

setMethod · 0.95
writeValueMethod · 0.45
spawnAuxMethod · 0.45

Calls 4

requireCommaOrNameMethod · 0.95
quoteValueMethod · 0.80
toStringMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected