edu.stanford.nlp.util
Class ArrayUtils

java.lang.Object
  extended byedu.stanford.nlp.util.ArrayUtils

public class ArrayUtils
extends Object

Static utility methods for operating on arrays.

Author:
Huy Nguyen (htnguyen@cs.stanford.edu)

Constructor Summary
protected ArrayUtils()
          Should not be instantiated
 
Method Summary
static void main(String[] args)
          For internal debugging purposes only
static double[] removeAt(double[] array, int index)
          Removes the element at the specified index from the array, and returns a new array containing the remaining elements.
static Object[] removeAt(Object[] array, int index)
          Removes the element at the specified index from the array, and returns a new array containing the remaining elements.
static String toString(int[][] a)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayUtils

protected ArrayUtils()
Should not be instantiated

Method Detail

removeAt

public static double[] removeAt(double[] array,
                                int index)
Removes the element at the specified index from the array, and returns a new array containing the remaining elements. If index is invalid, returns array unchanged.


removeAt

public static Object[] removeAt(Object[] array,
                                int index)
Removes the element at the specified index from the array, and returns a new array containing the remaining elements. If index is invalid, returns array unchanged. Uses reflection to determine the type of the array and returns an array of the appropriate type.


toString

public static String toString(int[][] a)

main

public static void main(String[] args)
For internal debugging purposes only



Stanford NLP Group