MCPcopy Create free account
hub / github.com/GregTech6/gregtech6 / getWithoutTrailingNulls

Method getWithoutTrailingNulls

src/main/java/gregapi/util/UT.java:1361–1367  ·  view source on GitHub ↗
(E... aArray)

Source from the content-addressed store, hash-verified

1359 }
1360
1361 @SafeVarargs
1362 public static <E> ArrayList<E> getWithoutTrailingNulls(E... aArray) {
1363 if (aArray == null) return new ArrayList<>(1);
1364 ArrayList<E> rList = new ArrayList<>(Arrays.asList(aArray));
1365 for (int i = rList.size() - 1; i >= 0 && rList.get(i) == null;) rList.remove(i--);
1366 return rList;
1367 }
1368
1369 @SafeVarargs
1370 public static <E> E getFirstNonNull(E... aArray) {

Callers 1

RecipeMethod · 0.80

Calls 3

getMethod · 0.65
removeMethod · 0.65
sizeMethod · 0.45

Tested by

no test coverage detected