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

Variable Index

 o debug

Constructor Index

 o Tools()

Method Index

 o double2byte(double[])
convert a double to a byte array
 o getKey()
return a unique string key.
 o getRange(byte[])
find the maximum and the minimum in a byte array
 o getRange(byte[], int, int)
find the maximum and the minimum in a byte array
 o getRange(double[])
find the maximum and the minimum in a double array
 o getRange(double[], int, int)
find the maximum and the minimum in a double array
 o getRange(float[])
find the maximum and the minimum in a float array
 o getRange(float[], int, int)
find the maximum and the minimum in a float array
 o getRange(int[])
find the maximum and the minimum in a int array
 o getRange(int[], int, int)
find the maximum and the minimum in a int array
 o getRange(long[])
find the maximum and the minimum in a long array
 o getRange(long[], int, int)
find the maximum and the minimum in a long array
 o getRange(short[])
find the maximum and the minimum in a short array
 o getRange(short[], int, int)
find the maximum and the minimum in a short array
 o notFalse(boolean)
 o notFalse(boolean, String)
 o notNull(Object)
 o notNull(Object, String)
 o sort(int[])
Sort an array of integers with insert sort
 o sort(String[])
Sort an array of strings with insert sort

Variables

 o debug
 public static boolean debug

Constructors

 o Tools
 public Tools()

Methods

 o 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
 o notFalse
 public static void notFalse(boolean b) throws IllegalArgumentException
 o notNull
 public static void notNull(Object obj) throws IllegalArgumentException
 o notFalse
 public static void notFalse(boolean b,
                             String s) throws IllegalArgumentException
 o notNull
 public static void notNull(Object obj,
                            String s) throws IllegalArgumentException
 o sort
 public static void sort(int a[])
Sort an array of integers with insert sort

 o sort
 public static void sort(String a[])
Sort an array of strings with insert sort

 o double2byte
 public static byte[] double2byte(double data[])
convert a double to a byte array

Parameters:
data - The input double array
Returns:
The byte array
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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