MCPcopy Create free account
hub / github.com/apache/commons-lang / get

Method get

src/main/java/org/apache/commons/lang3/ArrayUtils.java:2108–2110  ·  view source on GitHub ↗

Gets the nTh element of an array or null if the index is out of bounds or the array is null. @param The type of array elements. @param array The array to index. @param index The index. @return the nTh element of an array or null if the index is out of bounds or the array is null. @since 3.11

(final T[] array, final int index)

Source from the content-addressed store, hash-verified

2106 * @since 3.11
2107 */
2108 public static <T> T get(final T[] array, final int index) {
2109 return get(array, index, null);
2110 }
2111
2112 /**
2113 * Gets the nTh element of an array or a default value if the index is out of bounds.

Callers 2

testGetMethod · 0.95
testGetDefaultMethod · 0.95

Calls 1

isArrayIndexValidMethod · 0.95

Tested by 2

testGetMethod · 0.76
testGetDefaultMethod · 0.76