Java Code Examples for org.codehaus.groovy.runtime.StringGroovyMethods#toLong()

The following examples show how to use org.codehaus.groovy.runtime.StringGroovyMethods#toLong() . These examples are extracted from open source projects. 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 Project: groovy   File: GPathResult.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Converts the text of this GPathResult to a Long object.
 *
 * @return the GPathResult, converted to a <code>Long</code>
 */
public Long toLong() {
    if(textIsEmptyOrNull()){
        return null;
    }
    return StringGroovyMethods.toLong((CharSequence)text());
}
 
Example 2
Source Project: groovy   File: Node.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Converts the text of this GPathResult to a Long object.
 *
 * @return the GPathResult, converted to a <code>Long</code>
 */
public Long toLong() {
    if(textIsEmptyOrNull()){
        return null;
    }
    return StringGroovyMethods.toLong((CharSequence)text());
}