|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmckay.utilities.staticlibraries.ArrayMethods
public class ArrayMethods
A holder class for general static methods that can be used for processing arrays.
Constructor Summary | |
---|---|
ArrayMethods()
|
Method Summary | |
---|---|
static java.lang.String[] |
castArrayAsStrings(java.lang.Object[] to_cast)
Returns the given array of Objects as an array of Strings. |
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[] |
insertIntoArray(java.lang.Object[] original,
java.lang.Object[] to_insert,
int index_to_insert_at,
boolean delete_index_inserted_at)
Take the given original array and return a copy of it with the elements of to_insert inserted at the index_to_insert_at index of the original 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 |
---|
public ArrayMethods()
Method Detail |
---|
public static java.lang.Object[] removeNullEntriesFromArray(java.lang.Object[] array)
array
- The array to remove null entries from.
public static java.lang.Object[] getCopyOfArray(java.lang.Object[] given_array)
given_array
- The array to copy
public static java.lang.Object[] concatenateArray(java.lang.Object[] array_1, java.lang.Object[] array_2)
array_1
- The first array to concatenate.array_2
- The second array to concatenate.
public static java.lang.Object[] insertIntoArray(java.lang.Object[] original, java.lang.Object[] to_insert, int index_to_insert_at, boolean delete_index_inserted_at)
original
- The array to insert elements into.to_insert
- The array whose elements are to be
inserted.index_to_insert_at
- The index of original to begin
inserting the elements of to_insert
at.delete_index_inserted_at
- Whether to delete the element
originally at the index_to_insert_at
index of original.
public static java.lang.String[] castArrayAsStrings(java.lang.Object[] to_cast)
to_cast
- The array to cast.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |