public final class ArrayExtensions extends Object
ArrayExtensions is an extensions class for use with array objects.| Constructor and Description |
|---|
ArrayExtensions() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
getFirst(T[] array)
Gets the first object from the given array.
|
static <T> int |
getIndex(T[] array,
T element)
Gets the index of the given element in the given array.
|
static <T> T |
getLast(T[] array)
Gets the last object from the given array.
|
static <T> int |
getNextIndex(T[] array,
T element)
Gets the next index of the given array.
|
static <T> int[] |
getNextIndexes(T[] array,
T element,
int count)
Gets the next indexes from the given count of the given array.
|
static <T> int |
getPreviousIndex(T[] array,
T element)
Gets the previous index of the given array.
|
static <T> int[] |
getPreviousIndexes(T[] array,
T element,
int count)
Gets the previous indexes from the given count of the given array.
|
static <T> int |
indexOf(T[] array,
T element)
Gets the index of the given element in the given array.
|
static <T> boolean |
isFirst(T[] array,
T element)
Checks if the given element is the first in the given array.
|
static <T> boolean |
isLast(T[] array,
T element)
Checks if the given element is the last in the given array.
|
public static <T> T getFirst(T[] array)
T - the generic typearray - the array.public static <T> int getIndex(T[] array,
T element)
T - the generic typearray - the arrayelement - the elementpublic static <T> T getLast(T[] array)
T - the generic typearray - the array.public static <T> int getNextIndex(T[] array,
T element)
T - the generic typearray - the arrayelement - the elementpublic static <T> int[] getNextIndexes(T[] array,
T element,
int count)
T - the generic typearray - the arrayelement - the elementcount - the countpublic static <T> int getPreviousIndex(T[] array,
T element)
T - the generic typearray - the arrayelement - the elementpublic static <T> int[] getPreviousIndexes(T[] array,
T element,
int count)
T - the generic typearray - the arrayelement - the elementcount - the countpublic static <T> int indexOf(T[] array,
T element)
T - the generic typearray - the arrayelement - the elementpublic static <T> boolean isFirst(T[] array,
T element)
T - the generic typearray - the arrayelement - the elementpublic static <T> boolean isLast(T[] array,
T element)
T - the generic typearray - the arrayelement - the elementCopyright © 2015–2016 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.