mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-05 10:20:42 +01:00
Simplify forDifferencesBetweenArray
This commit is contained in:
parent
9a74051cdb
commit
515b5358da
@ -32,19 +32,16 @@ public final class ArrayUtils {
|
||||
|
||||
public static void forDifferencesBetweenArray(long @NotNull [] a, long @NotNull [] b,
|
||||
@NotNull LongConsumer consumer) {
|
||||
loop:
|
||||
for (final long aValue : a) {
|
||||
boolean contains = false;
|
||||
for (final long bValue : b) {
|
||||
if (bValue == aValue) {
|
||||
contains = true;
|
||||
break;
|
||||
continue loop;
|
||||
}
|
||||
}
|
||||
if (!contains) {
|
||||
consumer.accept(aValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static int @NotNull [] toArray(@NotNull IntList list) {
|
||||
int[] array = new int[list.size()];
|
||||
|
Loading…
Reference in New Issue
Block a user