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

## com.autonomy.utilities
Class NumberUtils

    java.lang.Object
      |
      +--com.autonomy.utilities.NumberUtils

public class NumberUtils
extends java.lang.Object

Library of functions specifically for working with numbers

Field Summary
`static char[]` | `acHexDigits`

Constructor Summary
`NumberUtils()`

Method Summary
`static java.lang.String` | `byteToHexString(byte b)` Converts a byte to a string containg exactly two hexadecimal numbers
`static byte` | `parseByteToHex(java.lang.String sb)` Converts a two character hex string to a byte
`static int[]` | `quickSort(int[] anToSort)` Sorts ints into numerical order
`static long[]` | `quickSort(long[] alnToSort)` Sorts longs into numerical order
`static int[]` | `quickSortWithMirror(int[] anToSort, int[] anToMirror)` Sorts ints into numerical order, mirroring the changes in the second array This functon will not do anything if the two arrays are not the same size
`static long[]` | `quickSortWithMirror(long[] alnToSort, long[] alnToMirror)` Sorts ints into numerical order, mirroring the changes in the second array This functon will not do anything if the two arrays are not the same size
`static long[]` | `quickSortWithMirror(long[] alnToSort, java.lang.String[] asToMirror)` Sorts ints into numerical order, mirroring the changes in the second array This functon will not do anything if the two arrays are not the same size

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

Field Detail

### acHexDigits

    public static final char[] acHexDigits

Constructor Detail

### NumberUtils

    public NumberUtils()

Method Detail

### quickSort

    public static int[] quickSort(int[] anToSort)

  Sorts ints into numerical order

  Parameters:
    `anToSort` - array to sort
  Returns:
    array sorted

### quickSort

    public static long[] quickSort(long[] alnToSort)

  Sorts longs into numerical order

  Parameters:
    `alnToSort` - array to sort
  Returns:
    array sorted

### quickSortWithMirror

    public static int[] quickSortWithMirror(int[] anToSort,
                                            int[] anToMirror)

  Sorts ints into numerical order, mirroring the changes in the second array This functon will not do anything if the two arrays are not the same size

  Parameters:
    `anToSort` - array to sort
    `anToMirror` - array to mirror changes in
  Returns:
    array sorted

### quickSortWithMirror

    public static long[] quickSortWithMirror(long[] alnToSort,
                                             java.lang.String[] asToMirror)

  Sorts ints into numerical order, mirroring the changes in the second array This functon will not do anything if the two arrays are not the same size

  Parameters:
    `alnToSort` - array to sort
    `asToMirror` - String array to mirror changes in
  Returns:
    array sorted

### quickSortWithMirror

    public static long[] quickSortWithMirror(long[] alnToSort,
                                             long[] alnToMirror)

  Sorts ints into numerical order, mirroring the changes in the second array This functon will not do anything if the two arrays are not the same size

  Parameters:
    `alnToSort` - array to sort
    `alnToMirror` - array to mirror changes in
  Returns:
    array sorted

### byteToHexString

    public static java.lang.String byteToHexString(byte b)

  Converts a byte to a string containg exactly two hexadecimal numbers

### parseByteToHex

    public static byte parseByteToHex(java.lang.String sb)
                               throws java.lang.NumberFormatException

  Converts a two character hex string to a byte

    `java.lang.NumberFormatException`

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