com.github.ignition.support
Class IgnitedArrays
java.lang.Object
com.github.ignition.support.IgnitedArrays
public class IgnitedArrays
- extends Object
Method Summary |
static
|
delete(T[] array,
int index)
|
static
|
find(T[] array,
T object)
Attempts to find an object in a potentially unsorted array. |
static
|
join(T[] head,
T[] tail)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IgnitedArrays
public IgnitedArrays()
join
public static <T> T[] join(T[] head,
T[] tail)
delete
public static <T> T[] delete(T[] array,
int index)
find
public static <T> int find(T[] array,
T object)
- Attempts to find an object in a potentially unsorted array. Complexity is O(N).
- Type Parameters:
T
- - Parameters:
array
- the input arrayobject
- the object to find
- Returns:
- the index of the object if found, -1 otherwise.
Copyright © 2012. All Rights Reserved.