/** * Returns a string representation of this size object. * * <strong>Note:</strong> The string representation may change at any time. * It is strongly recommended to not use this string for parsing purposes. * * @return a string representation of the constant size */ public String toString() { return (value == intValue()) ? Integer.toString(intValue()) + unit.abbreviation() : Double.toString(value) + unit.abbreviation(); }
/** * Returns a string representation of this size object. * * <strong>Note:</strong> This string representation may change * at any time. It is intended for debugging purposes. For parsing, * use {@link #encode()} instead. * * @return a string representation of the constant size */ public String toString() { return (value == intValue()) ? Integer.toString(intValue()) + unit.abbreviation() : Double.toString(value) + unit.abbreviation(); }
/** * Returns a string representation of this size object. * * <strong>Note:</strong> This string representation may change * at any time. It is intended for debugging purposes. For parsing, * use {@link #encode()} instead. * * @return a string representation of the constant size */ @Override public String toString() { return value == intValue() ? Integer.toString(intValue()) + unit.abbreviation() : Double.toString(value) + unit.abbreviation(); }