Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mindswap.pellet.utils
Class NumberUtils

    java.lang.Object
      org.mindswap.pellet.utils.NumberUtils

    public class NumberUtils

extends java.lang.Object

Field Summary
`static int` | `BYTE`
`static java.lang.Byte` | `BYTE_ZERO`
`static int` | `DECIMAL`
`static java.math.BigDecimal` | `DECIMAL_ZERO`
`static int` | `DOUBLE`
`static java.lang.Double` | `DOUBLE_ZERO`
`static int` | `FLOAT`
`static java.lang.Float` | `FLOAT_ZERO`
`static int` | `INT`
`static java.lang.Integer` | `INT_ZERO`
`static int` | `INTEGER`
`static java.math.BigInteger` | `INTEGER_ZERO`
`static int` | `LONG`
`static java.lang.Long` | `LONG_ZERO`
`static int` | `SHORT`
`static java.lang.Short` | `SHORT_ZERO`

Constructor Summary
`NumberUtils()`

Method Summary
`static java.lang.Number` | `add(java.lang.Number n1, int n2)`
`static int` | `compare(java.lang.Number n1, java.lang.Number n2)`
`static int` | `getFractionDigits(java.lang.Number n)`
`static int` | `getTotalDigits(java.lang.Number n)`
`static int` | `getType(java.lang.Number number)`
`static java.lang.String` | `getTypeName(java.lang.Number number)`
`static void` | `main(java.lang.String[] args)`
`static java.lang.Number` | `parse(java.lang.String str, int type)`
`static java.lang.Number` | `parseByte(java.lang.String str)`
`static java.lang.Number` | `parseDecimal(java.lang.String str)`
`static java.lang.Double` | `parseDouble(java.lang.String str)`
`static java.lang.Float` | `parseFloat(java.lang.String str)`
`static java.lang.Number` | `parseInt(java.lang.String str)`
`static java.lang.Number` | `parseInteger(java.lang.String str)`
`static java.lang.Number` | `parseLong(java.lang.String str)`
`static java.lang.Number` | `parseShort(java.lang.String str)`
`static int` | `sign(java.lang.Number n)`
`static void` | `test(java.lang.String val, int type, java.lang.Number test)`
`static void` | `test(java.lang.String val1, int type1, java.lang.String val2, int type2, int result)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### BYTE

    public static final int BYTE

See Also:
  Constant Field Values

### SHORT

    public static final int SHORT

See Also:
  Constant Field Values

### INT

    public static final int INT

See Also:
  Constant Field Values

### LONG

    public static final int LONG

See Also:
  Constant Field Values

### INTEGER

    public static final int INTEGER

See Also:
  Constant Field Values

### DECIMAL

    public static final int DECIMAL

See Also:
  Constant Field Values

### FLOAT

    public static final int FLOAT

See Also:
  Constant Field Values

### DOUBLE

    public static final int DOUBLE

See Also:
  Constant Field Values

### BYTE_ZERO

    public static final java.lang.Byte BYTE_ZERO

### SHORT_ZERO

    public static final java.lang.Short SHORT_ZERO

### INT_ZERO

    public static final java.lang.Integer INT_ZERO

### LONG_ZERO

    public static final java.lang.Long LONG_ZERO

### INTEGER_ZERO

    public static final java.math.BigInteger INTEGER_ZERO

### DECIMAL_ZERO

    public static final java.math.BigDecimal DECIMAL_ZERO

### FLOAT_ZERO

    public static final java.lang.Float FLOAT_ZERO

### DOUBLE_ZERO

    public static final java.lang.Double DOUBLE_ZERO

Constructor Detail

### NumberUtils

    public NumberUtils()

Method Detail

### parseByte

    public static java.lang.Number parseByte(java.lang.String str)
                                      throws java.lang.NumberFormatException

  Throws:
    `java.lang.NumberFormatException`

### parseShort

    public static java.lang.Number parseShort(java.lang.String str)
                                       throws java.lang.NumberFormatException

  Throws:
    `java.lang.NumberFormatException`

### parseInt

    public static java.lang.Number parseInt(java.lang.String str)
                                     throws java.lang.NumberFormatException

  Throws:
    `java.lang.NumberFormatException`

### parseLong

    public static java.lang.Number parseLong(java.lang.String str)
                                      throws java.lang.NumberFormatException

  Throws:
    `java.lang.NumberFormatException`

### parseInteger

    public static java.lang.Number parseInteger(java.lang.String str)
                                         throws java.lang.NumberFormatException

  Throws:
    `java.lang.NumberFormatException`

### parseDecimal

    public static java.lang.Number parseDecimal(java.lang.String str)
                                         throws java.lang.NumberFormatException

  Throws:
    `java.lang.NumberFormatException`

### parseFloat

    public static java.lang.Float parseFloat(java.lang.String str)
                                      throws java.lang.NumberFormatException

  Throws:
    `java.lang.NumberFormatException`

### parseDouble

    public static java.lang.Double parseDouble(java.lang.String str)
                                        throws java.lang.NumberFormatException

  Throws:
    `java.lang.NumberFormatException`

### parse

    public static java.lang.Number parse(java.lang.String str,
                                         int type)
                                  throws java.lang.NumberFormatException

  Throws:
    `java.lang.NumberFormatException`

### add

    public static java.lang.Number add(java.lang.Number n1,
                                       int n2)

### getType

    public static int getType(java.lang.Number number)

### getTypeName

    public static java.lang.String getTypeName(java.lang.Number number)

### sign

    public static int sign(java.lang.Number n)

### compare

    public static int compare(java.lang.Number n1,
                              java.lang.Number n2)

### getTotalDigits

    public static int getTotalDigits(java.lang.Number n)

### getFractionDigits

    public static int getFractionDigits(java.lang.Number n)

### test

    public static void test(java.lang.String val,
                            int type,
                            java.lang.Number test)

### test

    public static void test(java.lang.String val1,
                            int type1,
                            java.lang.String val2,
                            int type2,
                            int result)

### main

    public static void main(java.lang.String[] args)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Evren Sirin. All Rights Reserved.