Java org.apache.commons.lang NumberUtils fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.lang NumberUtils fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.lang NumberUtils.

The text is from its open source code.

Method

intcompare(double lhs, double rhs)

Compares two doubles for order.

This method is more comprehensive than the standard Java greater than, less than and equals operators.

  • It returns -1 if the first value is less than the second.
intcompare(float lhs, float rhs)

Compares two floats for order.

This method is more comprehensive than the standard Java greater than, less than and equals operators.

  • It returns -1 if the first value is less than the second.
BigDecimalcreateBigDecimal(String val)

Convert a String to a BigDecimal.

LongcreateLong(String val)

Convert a String to a Long.

booleanisDigits(String str)

Checks whether the String contains only digit characters.

Null and empty String will return false.

booleanisNumber(String str)

Checks whether the String a valid Java number.

Valid numbers include hexadecimal marked with the 0x qualifier, scientific notation and numbers marked with a type qualifier (e.g.

intstringToInt(String str)

Convert a String to an int, returning zero if the conversion fails.