jAudioFeatureExtractor.GeneralTools
Class GeneralMethods

java.lang.Object
  extended by jAudioFeatureExtractor.GeneralTools.GeneralMethods

public class GeneralMethods
extends java.lang.Object

A holder class for general static methods that can be used for a wide variety of purposes.

Author:
Cory McKay

Constructor Summary
GeneralMethods()
           
 
Method Summary
static java.lang.Object[] concatenateArray(java.lang.Object[] array_1, java.lang.Object[] array_2)
          Returns a new array whose first part consists of the elements of array_1 and whose second part consists of the elements of array_2.
static java.lang.Object[] getCopyOfArray(java.lang.Object[] given_array)
          Returns a copy of the given array.
static java.lang.Object[] removeNullEntriesFromArray(java.lang.Object[] array)
          Returns a shortened array, with all entries that were set to null removed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeneralMethods

public GeneralMethods()
Method Detail

removeNullEntriesFromArray

public static java.lang.Object[] removeNullEntriesFromArray(java.lang.Object[] array)
Returns a shortened array, with all entries that were set to null removed. Returns null if the resulting array has no valid entries or if the given array has no valid entries.

Parameters:
array - The array to remove null entries from.
Returns:
A shortened array with all null entries removed, or null.

getCopyOfArray

public static java.lang.Object[] getCopyOfArray(java.lang.Object[] given_array)
Returns a copy of the given array. Note that the entries are copied by reference.

Parameters:
given_array - The array to copy
Returns:
A copy of the given array.

concatenateArray

public static java.lang.Object[] concatenateArray(java.lang.Object[] array_1,
                                                  java.lang.Object[] array_2)
Returns a new array whose first part consists of the elements of array_1 and whose second part consists of the elements of array_2.

Parameters:
array_1 - The first array to concatenate.
array_2 - The second array to concatenate.
Returns:
array_1 and array_2 combined into 1 array.