# Class AU

java.lang.Object
javajs.util.AU

public final class AU extends Object

## Constructor Summary

Constructors
Constructor
Description
`AU()`

## Method Summary

Modifier and Type
Method
Description
`static boolean[]`
`arrayCopyBool(boolean[] array, int newLength)`
`static byte[]`
`arrayCopyByte(byte[] array, int newLength)`
`static float[]`
`arrayCopyF(float[] array, int newLength)`
`static int[]`
`arrayCopyI(int[] array, int newLength)`
`static int[][]`
`arrayCopyII(int[][] array, int newLength)`
`static Object`
`arrayCopyObject(Object array, int newLength)`
note -- cannot copy if array is null! does not copy if length is unchanged
`static T3[]`
`arrayCopyPt(T3[] array, int newLength)`
`static int[]`
`arrayCopyRangeI(int[] array, int i0, int n)`
a specialized method that allows copying from a starting point either to the end or to the middle (color schemes, especially)
`static int[]`
`arrayCopyRangeRevI(int[] array, int i0, int n)`
`static String[]`
`arrayCopyS(String[] array, int newLength)`
`static short[]`
`arrayCopyShort(short[] array, int newLength)`
`static <type> Lst<type>[]`
`createArrayOfArrayList(int size)`
Helper method for creating a List<Tx>[] without warnings.
`static <K,V> Map<K,V>[]`
`createArrayOfHashtable(int size)`
Helper method for creating a Mapinvalid input: '<'K, V>[] without warnings.
`static Object`
`deleteElements(Object array, int firstElement, int nElements)`
`static Object`
`doubleLength(Object array)`
Very important that this not be used with Int32Array or Float32Array, because it is not initialized to all zeros in MSIE 9.
`static boolean[]`
`doubleLengthBool(boolean[] array)`
`static byte[]`
`doubleLengthByte(byte[] array)`
`static float[]`
`doubleLengthF(float[] array)`
`static int[]`
`doubleLengthI(int[] array)`
`static String[]`
`doubleLengthS(String[] array)`
`static short[]`
`doubleLengthShort(short[] array)`
`static String`
`dumpArray(String msg, float[][] A, int x1, int x2, int y1, int y2)`
`static String`
`dumpIntArray(int[] A, int n)`
`static Object`
`ensureLength(Object array, int minimumLength)`
Very important that this not be used with Int32Array or Float32Array, because it is not initialized to all zeros in MSIE 9.
`static float[]`
`ensureLengthA(float[] array, int minimumLength)`
`static byte[]`
`ensureLengthByte(byte[] array, int minimumLength)`
`static int[]`
`ensureLengthI(int[] array, int minimumLength)`
`static String[]`
`ensureLengthS(String[] array, int minimumLength)`
`static short[]`
`ensureLengthShort(short[] array, int minimumLength)`
`static byte[]`
`ensureSignedBytes(byte[] b)`
Ensure that we have signed and not unsigned bytes coming out of any process, but particularly out of file reading.
`static int`
`getLength(Object array)`
`static boolean`
`isAB(Object x)`
`static boolean`
`isAD(Object x)`
`static boolean`
`isADD(Object x)`
`static boolean`
`isADDD(Object x)`
`static boolean`
`isAF(Object x)`
`static boolean`
`isAFF(Object x)`
`static boolean`
`isAFFF(Object x)`
`static boolean`
`isAFloat(Object x)`
`static boolean`
`isAI(Object x)`
`static boolean`
`isAII(Object x)`
`static boolean`
`isAP(Object x)`
`static boolean`
`isAS(Object x)`
`static boolean`
`isASS(Object x)`
`static byte[][]`
`newByte2(int n)`
`static double[][]`
`newDouble2(int n)`
`static double[][][]`
`newDouble3n(int n)`
`static float[][]`
`newFloat2(int n)`
`static float[][][]`
`newFloat3(int nx, int ny)`
`static int[][]`
`newInt2(int n)`
`static int[][][]`
`newInt3(int nx, int ny)`
`static int[][][][]`
`newInt4(int n)`
`static short[][]`
`newShort2(int n)`
`static int`
`removeMapKeys(Map<String,?> map, String root)`
remove all keys from a map that start with given root
`static String`
`sortedItem(Lst<String> v, int n)`
`static void`
`swap(Object[] o, int i, int j)`
`static void`
`swapInt(int[] array, int indexA, int indexB)`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### AU

public AU()

## Method Details

### ensureLength

public static Object ensureLength(Object array, int minimumLength)
Very important that this not be used with Int32Array or Float32Array, because it is not initialized to all zeros in MSIE 9.

Parameters:
  `array` -
  `minimumLength` -
Returns:
  array

### ensureLengthS

public static String[] ensureLengthS(String[] array, int minimumLength)

### ensureLengthA

public static float[] ensureLengthA(float[] array, int minimumLength)

### ensureLengthI

public static int[] ensureLengthI(int[] array, int minimumLength)

### ensureLengthShort

public static short[] ensureLengthShort(short[] array, int minimumLength)

### ensureLengthByte

public static byte[] ensureLengthByte(byte[] array, int minimumLength)

### doubleLength

public static Object doubleLength(Object array)
Very important that this not be used with Int32Array or Float32Array, because it is not initialized to all zeros in MSIE 9.

Parameters:
  `array` -
Returns:
  array

### doubleLengthS

public static String[] doubleLengthS(String[] array)

### doubleLengthF

public static float[] doubleLengthF(float[] array)

### doubleLengthI

public static int[] doubleLengthI(int[] array)

### doubleLengthShort

public static short[] doubleLengthShort(short[] array)

### doubleLengthByte

public static byte[] doubleLengthByte(byte[] array)

### doubleLengthBool

public static boolean[] doubleLengthBool(boolean[] array)

### deleteElements

public static Object deleteElements(Object array, int firstElement, int nElements)

### arrayCopyObject

public static Object arrayCopyObject(Object array, int newLength)
note -- cannot copy if array is null! does not copy if length is unchanged

Parameters:
  `array` -
  `newLength` -
Returns:
  array

### getLength

public static int getLength(Object array)

### arrayCopyS

public static String[] arrayCopyS(String[] array, int newLength)

### arrayCopyII

public static int[][] arrayCopyII(int[][] array, int newLength)

### arrayCopyPt

public static T3[] arrayCopyPt(T3[] array, int newLength)

### arrayCopyF

public static float[] arrayCopyF(float[] array, int newLength)

### arrayCopyI

public static int[] arrayCopyI(int[] array, int newLength)

### arrayCopyRangeI

public static int[] arrayCopyRangeI(int[] array, int i0, int n)
a specialized method that allows copying from a starting point either to the end or to the middle (color schemes, especially)

Parameters:
  `array` -
  `i0` -
  `n` -
Returns:
  array or null

### arrayCopyRangeRevI

public static int[] arrayCopyRangeRevI(int[] array, int i0, int n)

### arrayCopyShort

public static short[] arrayCopyShort(short[] array, int newLength)

### arrayCopyByte

public static byte[] arrayCopyByte(byte[] array, int newLength)

### arrayCopyBool

public static boolean[] arrayCopyBool(boolean[] array, int newLength)

### swapInt

public static void swapInt(int[] array, int indexA, int indexB)

### dumpArray

public static String dumpArray(String msg, float[][] A, int x1, int x2, int y1, int y2)

### dumpIntArray

public static String dumpIntArray(int[] A, int n)

### sortedItem

public static String sortedItem(Lst<String> v, int n)

### createArrayOfArrayList

public static <type> Lst<type>[] createArrayOfArrayList(int size)
Helper method for creating a List<Tx>[] without warnings.

Type Parameters:
  `type` - Type of objects in the list.
Parameters:
  `size` - Array size.
Returns:
  Array of List<type>

### createArrayOfHashtable

public static <K,V> Map<K,V>[] createArrayOfHashtable(int size)
Helper method for creating a Mapinvalid input: '<'K, V>[] without warnings.

Type Parameters:
  `K` - Type of object for the keys in the map.
  `V` - Type of object for the values in the map.
Parameters:
  `size` - Array size.
Returns:
  Array of Mapinvalid input: '<'K, V>

### swap

public static void swap(Object[] o, int i, int j)

### newFloat2

public static float[][] newFloat2(int n)

### newInt2

public static int[][] newInt2(int n)

### newInt3

public static int[][][] newInt3(int nx, int ny)

### newFloat3

public static float[][][] newFloat3(int nx, int ny)

### newInt4

public static int[][][][] newInt4(int n)

### newShort2

public static short[][] newShort2(int n)

### newByte2

public static byte[][] newByte2(int n)

### newDouble2

public static double[][] newDouble2(int n)

### newDouble3n

public static double[][][] newDouble3n(int n)

### removeMapKeys

public static int removeMapKeys(Map<String,?> map, String root)
remove all keys from a map that start with given root

Parameters:
  `map` -
  `root` -
Returns:
  number removed

### isAS

public static boolean isAS(Object x)

### isASS

public static boolean isASS(Object x)

### isAP

public static boolean isAP(Object x)

### isAF

public static boolean isAF(Object x)

### isAFloat

public static boolean isAFloat(Object x)

### isAD

public static boolean isAD(Object x)

### isADD

public static boolean isADD(Object x)

### isADDD

public static boolean isADDD(Object x)

### isAB

public static boolean isAB(Object x)

### isAI

public static boolean isAI(Object x)

### isAII

public static boolean isAII(Object x)

### isAFF

public static boolean isAFF(Object x)

### isAFFF

public static boolean isAFFF(Object x)

### ensureSignedBytes

public static byte[] ensureSignedBytes(byte[] b)
Ensure that we have signed and not unsigned bytes coming out of any process, but particularly out of file reading.

Parameters:
  `b` -
Returns:
  b