class_body
{ "{"
block_comment "/** Reusable Long constant for zero. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Long"
variable_declarator
identifier "LONG_ZERO"
= "="
method_invocation
identifier "Long"
. "."
identifier "valueOf"
argument_list
( "("
decimal_integer_literal "0L"
) ")"
; ";"
block_comment "/** Reusable Long constant for one. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Long"
variable_declarator
identifier "LONG_ONE"
= "="
method_invocation
identifier "Long"
. "."
identifier "valueOf"
argument_list
( "("
decimal_integer_literal "1L"
) ")"
; ";"
block_comment "/** Reusable Long constant for minus one. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Long"
variable_declarator
identifier "LONG_MINUS_ONE"
= "="
method_invocation
identifier "Long"
. "."
identifier "valueOf"
argument_list
( "("
unary_expression
- "-"
decimal_integer_literal "1L"
) ")"
; ";"
block_comment "/** Reusable Integer constant for zero. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Integer"
variable_declarator
identifier "INTEGER_ZERO"
= "="
method_invocation
identifier "Integer"
. "."
identifier "valueOf"
argument_list
( "("
decimal_integer_literal "0"
) ")"
; ";"
block_comment "/** Reusable Integer constant for one. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Integer"
variable_declarator
identifier "INTEGER_ONE"
= "="
method_invocation
identifier "Integer"
. "."
identifier "valueOf"
argument_list
( "("
decimal_integer_literal "1"
) ")"
; ";"
block_comment "/** Reusable Integer constant for minus one. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Integer"
variable_declarator
identifier "INTEGER_MINUS_ONE"
= "="
method_invocation
identifier "Integer"
. "."
identifier "valueOf"
argument_list
( "("
unary_expression
- "-"
decimal_integer_literal "1"
) ")"
; ";"
block_comment "/** Reusable Short constant for zero. */"
field_declaration (+23 nodes collapsed)
block_comment "/** Reusable Short constant for one. */"
field_declaration (+23 nodes collapsed)
block_comment "/** Reusable Short constant for minus one. */"
field_declaration (+25 nodes collapsed)
block_comment "/** Reusable Byte constant for zero. */"
field_declaration (+23 nodes collapsed)
block_comment "/** Reusable Byte constant for one. */"
field_declaration (+23 nodes collapsed)
block_comment "/** Reusable Byte constant for minus one. */"
field_declaration (+25 nodes collapsed)
block_comment "/** Reusable Double constant for zero. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Double"
variable_declarator
identifier "DOUBLE_ZERO"
= "="
method_invocation
identifier "Double"
. "."
identifier "valueOf"
argument_list
( "("
decimal_floating_point_literal "0.0d"
) ")"
; ";"
block_comment "/** Reusable Double constant for one. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Double"
variable_declarator
identifier "DOUBLE_ONE"
= "="
method_invocation
identifier "Double"
. "."
identifier "valueOf"
argument_list
( "("
decimal_floating_point_literal "1.0d"
) ")"
; ";"
block_comment "/** Reusable Double constant for minus one. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Double"
variable_declarator
identifier "DOUBLE_MINUS_ONE"
= "="
method_invocation
identifier "Double"
. "."
identifier "valueOf"
argument_list
( "("
unary_expression
- "-"
decimal_floating_point_literal "1.0d"
) ")"
; ";"
block_comment "/** Reusable Float constant for zero. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Float"
variable_declarator
identifier "FLOAT_ZERO"
= "="
method_invocation
identifier "Float"
. "."
identifier "valueOf"
argument_list
( "("
decimal_floating_point_literal "0.0f"
) ")"
; ";"
block_comment "/** Reusable Float constant for one. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Float"
variable_declarator
identifier "FLOAT_ONE"
= "="
method_invocation
identifier "Float"
. "."
identifier "valueOf"
argument_list
( "("
decimal_floating_point_literal "1.0f"
) ")"
; ";"
block_comment "/** Reusable Float constant for minus one. */"
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "Float"
variable_declarator
identifier "FLOAT_MINUS_ONE"
= "="
method_invocation
identifier "Float"
. "."
identifier "valueOf"
argument_list
( "("
unary_expression
- "-"
decimal_floating_point_literal "1.0f"
) ")"
; ";"
block_comment "/**\n * <p><code>NumberUtils</code> instances should NOT "...
constructor_declaration
modifiers
public "public"
identifier "NumberUtils"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
explicit_constructor_invocation
super "super"
argument_list
( "("
) ")"
; ";"
} "}"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Convert a <code>String</code> to an <code>int<"...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to an <code>int<"...
method_declaration (+68 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>long<"...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>long<"...
method_declaration (+68 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>float"...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>float"...
method_declaration (+68 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>doubl"...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>doubl"...
method_declaration (+68 nodes collapsed)
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>byte<"...
method_declaration (+32 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>byte<"...
method_declaration (+68 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>short"...
method_declaration (+32 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to an <code>shor"...
method_declaration (+68 nodes collapsed)
line_comment "//----------------------------------------------------------"...
line_comment "// must handle Long, Float, Integer, Float, Short,"
line_comment "// BigDecimal, BigInteger and Byte"
line_comment "// useful methods:"
line_comment "// Byte.decode(String)"
line_comment "// Byte.valueOf(String,int radix)"
line_comment "// Byte.valueOf(String)"
line_comment "// Double.valueOf(String)"
line_comment "// Float.valueOf(String)"
line_comment "// Float.valueOf(String)"
line_comment "// Integer.valueOf(String,int radix)"
line_comment "// Integer.valueOf(String)"
line_comment "// Integer.decode(String)"
line_comment "// Integer.getInteger(String)"
line_comment "// Integer.getInteger(String,int val)"
line_comment "// Integer.getInteger(String,Integer val)"
line_comment "// Integer.valueOf(String)"
line_comment "// Double.valueOf(String)"
line_comment "// new Byte(String)"
line_comment "// Long.valueOf(String)"
line_comment "// Long.getLong(String)"
line_comment "// Long.getLong(String,int)"
line_comment "// Long.getLong(String,Integer)"
line_comment "// Long.valueOf(String,int)"
line_comment "// Long.valueOf(String)"
line_comment "// Short.valueOf(String)"
line_comment "// Short.decode(String)"
line_comment "// Short.valueOf(String,int)"
line_comment "// Short.valueOf(String)"
line_comment "// new BigDecimal(String)"
line_comment "// new BigInteger(String)"
line_comment "// new BigInteger(String,int radix)"
line_comment "// Possible inputs:"
line_comment "// 45 45.5 45E7 4.5E7 Hex Oct Binary xxxF xxxD xxxf xxxd"
line_comment "// plus minus everything. Prolly more. A lot are not separab"...
block_comment "/**\n * <p>Turns a string value into a java.lang.Number.<"...
method_declaration
modifiers
public "public"
static "static"
type_identifier "Number"
identifier "createNumber"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "str"
) ")"
throws
throws "throws"
type_identifier "NumberFormatException"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "str"
== "=="
null_literal "null"
) ")"
block
{ "{"
return_statement
return "return"
null_literal "null"
; ";"
} "}"
if_statement (+29 nodes collapsed)
if_statement (+27 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
binary_expression any 1:3
method_invocation
identifier "str"
. "."
identifier "startsWith"
argument_list
( "("
string_literal
" "\""
string_fragment "0x"
" "\""
) ")"
|| "||"
method_invocation
identifier "str"
. "."
identifier "startsWith"
argument_list
( "("
string_literal
" "\""
string_fragment "-0x"
" "\""
) ")"
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "createInteger"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
local_variable_declaration (+24 nodes collapsed)
local_variable_declaration
type_identifier "String"
variable_declarator
identifier "mant"
; ";"
local_variable_declaration
type_identifier "String"
variable_declarator
identifier "dec"
; ";"
local_variable_declaration
type_identifier "String"
variable_declarator
identifier "exp"
; ";"
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "decPos"
= "="
method_invocation
identifier "str"
. "."
identifier "indexOf"
argument_list
( "("
character_literal "'.'"
) ")"
; ";"
local_variable_declaration (+28 nodes collapsed)
if_statement (+204 nodes collapsed)
if_statement (+820 nodes collapsed)
} "}"
block_comment "/**\n * <p>Utility method for {@link #createNumber(java.l"...
method_declaration (+99 nodes collapsed)
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>Float"...
method_declaration (+42 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>Doubl"...
method_declaration (+42 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>Integ"...
method_declaration (+43 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>Long<"...
method_declaration (+42 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>BigIn"...
method_declaration (+41 nodes collapsed)
block_comment "/**\n * <p>Convert a <code>String</code> to a <code>BigDe"...
method_declaration (+71 nodes collapsed)
line_comment "// Min in array"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Returns the minimum value in an array.</p>\n "...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Returns the minimum value in an array.</p>\n "...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Returns the minimum value in an array.</p>\n "...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Returns the minimum value in an array.</p>\n "...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Returns the minimum value in an array.</p>\n "...
method_declaration (+172 nodes collapsed)
block_comment "/**\n * <p>Returns the minimum value in an array.</p>\n "...
method_declaration (+172 nodes collapsed)
line_comment "// Max in array"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Returns the maximum value in an array.</p>\n "...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Returns the maximum value in an array.</p>\n "...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Returns the maximum value in an array.</p>\n "...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Returns the maximum value in an array.</p>\n "...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Returns the maximum value in an array.</p>\n "...
method_declaration (+172 nodes collapsed)
block_comment "/**\n * <p>Returns the maximum value in an array.</p>\n "...
method_declaration (+172 nodes collapsed)
line_comment "// 3 param min"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Gets the minimum of three <code>long</code> va"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Gets the minimum of three <code>int</code> val"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Gets the minimum of three <code>short</code> v"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Gets the minimum of three <code>byte</code> va"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Gets the minimum of three <code>double</code> "...
method_declaration (+49 nodes collapsed)
block_comment "/**\n * <p>Gets the minimum of three <code>float</code> v"...
method_declaration (+49 nodes collapsed)
line_comment "// 3 param max"
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Gets the maximum of three <code>long</code> va"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Gets the maximum of three <code>int</code> val"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Gets the maximum of three <code>short</code> v"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Gets the maximum of three <code>byte</code> va"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * <p>Gets the maximum of three <code>double</code> "...
method_declaration (+49 nodes collapsed)
block_comment "/**\n * <p>Gets the maximum of three <code>float</code> v"...
method_declaration (+49 nodes collapsed)
line_comment "//----------------------------------------------------------"...
block_comment "/**\n * <p>Checks whether the <code>String</code> contain"...
method_declaration (+97 nodes collapsed)
block_comment "/**\n * <p>Checks whether the String a valid Java number."...
method_declaration (+779 nodes collapsed)
} "}"