Returns a text description of this result. @return a text description of this result.
()
| 261 | * @return a text description of this result. |
| 262 | */ |
| 263 | @Override |
| 264 | public String toString() { |
| 265 | String dsc = null; |
| 266 | switch (this.type) { |
| 267 | case TYPE_UNDERFLOW: |
| 268 | dsc = "UNDERFLOW error"; //$NON-NLS-1$ |
| 269 | break; |
| 270 | case TYPE_OVERFLOW: |
| 271 | dsc = "OVERFLOW error"; //$NON-NLS-1$ |
| 272 | break; |
| 273 | case TYPE_UNMAPPABLE_CHAR: |
| 274 | dsc = "Unmappable-character error with erroneous input length " //$NON-NLS-1$ |
| 275 | + this.length; |
| 276 | break; |
| 277 | case TYPE_MALFORMED_INPUT: |
| 278 | dsc = "Malformed-input error with erroneous input length " //$NON-NLS-1$ |
| 279 | + this.length; |
| 280 | break; |
| 281 | default: |
| 282 | dsc = ""; //$NON-NLS-1$ |
| 283 | break; |
| 284 | } |
| 285 | return "CoderResult[" + dsc + "]"; //$NON-NLS-1$ //$NON-NLS-2$ |
| 286 | |
| 287 | } |
| 288 | |
| 289 | } |