()
| 195 | } |
| 196 | |
| 197 | @Override |
| 198 | public String toString() { |
| 199 | parse(); |
| 200 | |
| 201 | if (special != null) { |
| 202 | switch (special) { |
| 203 | case NAN: |
| 204 | return "NaN"; |
| 205 | case POSITIVE_INFINITY: |
| 206 | return "Infinity"; |
| 207 | case NEGATIVE_INFINITY: |
| 208 | return "-Infinity"; |
| 209 | } |
| 210 | } |
| 211 | else if (coefficient != null) |
| 212 | return exponent != 0 ? (coefficient + "E" + exponent) : coefficient.toString(); |
| 213 | |
| 214 | return String.valueOf(data); |
| 215 | } |
| 216 | |
| 217 | private final void parse() { |
| 218 | if (coefficient != null || special != null) |