org.springframework.data.gemfire.util
Class ArrayUtils

java.lang.Object
  extended by org.springframework.data.gemfire.util.ArrayUtils

public abstract class ArrayUtils
extends Object


Constructor Summary
ArrayUtils()
           
 
Method Summary
static Object[] insert(Object[] originalArray, int pos, Object element)
          Insert an element into an array.
static Object[] remove(Object[] originalArray, int pos)
          Remove element from an array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayUtils

public ArrayUtils()
Method Detail

insert

public static Object[] insert(Object[] originalArray,
                              int pos,
                              Object element)
Insert an element into an array. The element is inserted at the given position, all elements afterwards are moved to the right.

Parameters:
originalArray - array to insert into
pos - position at which to insert the element
element - element to add
Returns:
the new array

remove

public static Object[] remove(Object[] originalArray,
                              int pos)
Remove element from an array. The element is removed at the specified position, and all remaining elements are moved to the left.

Parameters:
originalArray - array to remove from
pos - position to remove
Returns:
the new array