Makes listContains and concatenate functions public

This commit is contained in:
Kristian Knarvik 2021-01-25 21:56:59 +01:00
parent 40a2f58712
commit 8ffd4184d3

View File

@ -21,7 +21,7 @@ public final class ListUtil {
* @param <T> <p>The type of the two lists.</p>
* @return <p>A new array containing all elements from the two arrays.</p>
*/
static <T> T[] concatenate(T[] listA, T[] listB) {
public static <T> T[] concatenate(T[] listA, T[] listB) {
int listALength = listA.length;
int listBLength = listB.length;
@SuppressWarnings("unchecked")
@ -53,7 +53,7 @@ public final class ListUtil {
* @param <T> Anything which can be stored in a list
* @return True if at least one element fulfills the predicate
*/
static <T> boolean listContains(T[] list, Predicate<T> predicate) {
public static <T> boolean listContains(T[] list, Predicate<T> predicate) {
for (T item : list) {
if (predicate.test(item)) {
return true;