Java Code Examples for org.codehaus.groovy.runtime.StringGroovyMethods#toDouble()
The following examples show how to use
org.codehaus.groovy.runtime.StringGroovyMethods#toDouble() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GPathResult.java From groovy with Apache License 2.0 | 5 votes |
/** * Converts the text of this GPathResult to a Double object. * * @return the GPathResult, converted to a <code>Double</code> */ public Double toDouble() { if(textIsEmptyOrNull()){ return null; } return StringGroovyMethods.toDouble((CharSequence)text()); }
Example 2
Source File: Node.java From groovy with Apache License 2.0 | 5 votes |
/** * Converts the text of this GPathResult to a Double object. * * @return the GPathResult, converted to a <code>Double</code> */ public Double toDouble() { if(textIsEmptyOrNull()){ return null; } return StringGroovyMethods.toDouble((CharSequence)text()); }