convenience method to get this element as a float. @return get this element as a float. @throws NumberFormatException if the value contained is not a valid float.
()
| 231 | * @throws NumberFormatException if the value contained is not a valid float. |
| 232 | */ |
| 233 | @Override |
| 234 | public float getAsFloat() { |
| 235 | return isNumber() ? getAsNumber().floatValue() : Float.parseFloat(getAsString()); |
| 236 | } |
| 237 | |
| 238 | /** |
| 239 | * convenience method to get this element as a primitive long. |