public String getAsString() {
        if (asString == null) {
            if (raw == null) {
                asString = "";
            } else if (raw instanceof Double || raw instanceof Float) {
                asString = DOUBLE_TO_STRING_FORMAT.format(((Number) raw).doubleValue());
            } else if (raw instanceof BigDecimal) {
                asString = ((BigDecimal) raw).stripTrailingZeros().toPlainString();
            } else {
                asString = raw instanceof String ? (String) raw : raw.toString();
            }
        }
        return asString;
    }
Encapsulates a single value for handling in {@link Formula}. Provides e.g. type conversions.
<br>
Supports raw values of type String, CharSequence, Double, Long, BigInterger and BigDecimal
main/src/main/java/cgeo/geocaching/utils/formulas/Value.java