no.uio.edd.utils.datautils
Class EddDataUtils

java.lang.Object
  extended by no.uio.edd.utils.datautils.EddDataUtils

public class EddDataUtils
extends java.lang.Object


Constructor Summary
EddDataUtils()
           
 
Method Summary
static java.lang.Object[] arrayNoNulls(java.lang.Object[] inArr)
          Removes all nulls in the array, including trailing nulls.
static int countArrayNonnull(java.lang.Object[] inArr)
          Count all non-null objects in an array.
static java.lang.String[] enumerateList(int start, int end, java.lang.String prefix)
          Makes a list of strings, each consisting of a number counting from start to end prefixed by the prefix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EddDataUtils

public EddDataUtils()
Method Detail

countArrayNonnull

public static int countArrayNonnull(java.lang.Object[] inArr)
Count all non-null objects in an array.

Parameters:
inArr - The input array.
Returns:
The number of non-null objects in the array. If the array is null, 0 is returned.

arrayNoNulls

public static java.lang.Object[] arrayNoNulls(java.lang.Object[] inArr)
Removes all nulls in the array, including trailing nulls. Thus, an array is returned which is shorter to or equal with the argument.

Parameters:
inArr - The array to be reduced
Returns:
An array without null values

enumerateList

public static java.lang.String[] enumerateList(int start,
                                               int end,
                                               java.lang.String prefix)
Makes a list of strings, each consisting of a number counting from start to end prefixed by the prefix.

Parameters:
start - Where to start.
end - Where to end.
prefix -
Returns: