All Packages Class Hierarchy This Package Previous Next Index
Class ncsa.hdf.util.Tools
java.lang.Object
|
+----ncsa.hdf.util.Tools
- public class Tools
- extends Object
-
debug
-
-
Tools()
-
-
double2byte(double[])
- convert a double to a byte array
-
getKey()
- return a unique string key.
-
getRange(byte[])
- find the maximum and the minimum in a byte array
-
getRange(byte[], int, int)
- find the maximum and the minimum in a byte array
-
getRange(double[])
- find the maximum and the minimum in a double array
-
getRange(double[], int, int)
- find the maximum and the minimum in a double array
-
getRange(float[])
- find the maximum and the minimum in a float array
-
getRange(float[], int, int)
- find the maximum and the minimum in a float array
-
getRange(int[])
- find the maximum and the minimum in a int array
-
getRange(int[], int, int)
- find the maximum and the minimum in a int array
-
getRange(long[])
- find the maximum and the minimum in a long array
-
getRange(long[], int, int)
- find the maximum and the minimum in a long array
-
getRange(short[])
- find the maximum and the minimum in a short array
-
getRange(short[], int, int)
- find the maximum and the minimum in a short array
-
notFalse(boolean)
-
-
notFalse(boolean, String)
-
-
notNull(Object)
-
-
notNull(Object, String)
-
-
sort(int[])
- Sort an array of integers with insert sort
-
sort(String[])
- Sort an array of strings with insert sort
debug
public static boolean debug
Tools
public Tools()
getKey
public static synchronized String getKey()
- return a unique string key. This method is synchronized.
Only one thread calls it a time to make the key unique.
- Returns:
- The string key
notFalse
public static void notFalse(boolean b) throws IllegalArgumentException
notNull
public static void notNull(Object obj) throws IllegalArgumentException
notFalse
public static void notFalse(boolean b,
String s) throws IllegalArgumentException
notNull
public static void notNull(Object obj,
String s) throws IllegalArgumentException
sort
public static void sort(int a[])
- Sort an array of integers with insert sort
sort
public static void sort(String a[])
- Sort an array of strings with insert sort
double2byte
public static byte[] double2byte(double data[])
- convert a double to a byte array
- Parameters:
- data - The input double array
- Returns:
- The byte array
getRange
public static double[] getRange(double data[])
- find the maximum and the minimum in a double array
- Parameters:
- data - The input double array
- Returns:
- The max and min data
getRange
public static float[] getRange(float data[])
- find the maximum and the minimum in a float array
- Parameters:
- data - The input float array
- Returns:
- The max and min data
getRange
public static long[] getRange(long data[])
- find the maximum and the minimum in a long array
- Parameters:
- data - The input long array
- Returns:
- The max and min data
getRange
public static int[] getRange(int data[])
- find the maximum and the minimum in a int array
- Parameters:
- data - The input int array
- Returns:
- The max and min data
getRange
public static byte[] getRange(byte data[])
- find the maximum and the minimum in a byte array
- Parameters:
- data - The input byte array
- Returns:
- The max and min data
getRange
public static short[] getRange(short data[])
- find the maximum and the minimum in a short array
- Parameters:
- data - The input byte array
- Returns:
- The max and min data
getRange
public static double[] getRange(double data[],
int low,
int high)
- find the maximum and the minimum in a double array
- Parameters:
- data - The input double array
- low - The lower index
- high - The higher index
- Returns:
- The max and min data
getRange
public static float[] getRange(float data[],
int low,
int high)
- find the maximum and the minimum in a float array
- Parameters:
- data - The input float array
- low - The lower index
- high - The higher index
- Returns:
- The max and min data
getRange
public static long[] getRange(long data[],
int low,
int high)
- find the maximum and the minimum in a long array
- Parameters:
- data - The input long array
- low - The lower index
- high - The higher index
- Returns:
- The max and min data
getRange
public static int[] getRange(int data[],
int low,
int high)
- find the maximum and the minimum in a int array
- Parameters:
- data - The input int array
- low - The lower index
- high - The higher index
- Returns:
- The max and min data
getRange
public static byte[] getRange(byte data[],
int low,
int high)
- find the maximum and the minimum in a byte array
- Parameters:
- data - The input byte array
- low - The lower index
- high - The higher index
- Returns:
- The max and min data
getRange
public static short[] getRange(short data[],
int low,
int high)
- find the maximum and the minimum in a short array
- Parameters:
- data - The input byte array
- low - The lower index
- high - The higher index
- Returns:
- The max and min data
All Packages Class Hierarchy This Package Previous Next Index