_Arrays { public static <T> boolean testAllMatch( @Nullable final T[] array1, @Nullable final T[] array2, final BiPredicate<T, T> test) { _With.requires(test, "test"); return !testAnyMatch(array1, array2, test.negate()); }  static boolean testAnyMatch(
            @Nullable final T[] array1, 
            @Nullable final T[] array2, 
            final BiPredicate<T, T> test); static boolean testAllMatch(
            @Nullable final T[] array1, 
            @Nullable final T[] array2, 
            final BiPredicate<T, T> test); static boolean isArrayType(@Nullable final Class<?> cls); static boolean isCollectionOrArrayType(final Class<?> cls); static Collector<T,?,T[]> toArray(final Class<T> componentType, final int length); static Collector<T,?,T[]> toArray(final Class<T> componentType); @SafeVarargs static T[] combine(T first, @Nullable  T... rest); @SafeVarargs static T[] combineWithExplicitType(Class<T> type, X first, @Nullable  Y... rest); @SafeVarargs static T[] combine(T[] first, T... rest); static T[] toArray(@Nullable final Collection<? extends T> collection, final Class<T> componentType); static T[] toArray(@Nullable final Iterable<? extends T> iterable, final Class<T> componentType); static T[] removeByIndex(T[] array, int index); static @Nullable T[] emptyToNull(T[] array); static @Nullable Class<?> inferComponentTypeIfAny(@Nullable final Class<?> arrayType); static Optional<T> get(@Nullable T[] array, int index); @Nullable static R[] map(
            @Nullable T[] array, 
            @NonNull Class<R> resultElementType, 
            @NonNull Function<T, R> mapper); @Nullable static Object[] map(
            @Nullable T[] array, 
            @NonNull Function<T, ?> mapper); @Nullable static R[] mapCollection(
            @Nullable Collection<T> collection, 
            @NonNull Class<R> resultElementType, 
            @NonNull Function<T, R> mapper); @Nullable static Object[] mapCollection(
            @Nullable Collection<T> collection, 
            @NonNull Function<T, ?> mapper);  }
@Test void testTestAllMatch() { FiniteSpace2.visit(inputSamples, inputSamples, (i, j, a, b)->{ if(_NullSafe.size(a) != _NullSafe.size(b)) { assertThrows(IllegalArgumentException.class, ()->_Arrays.testAllMatch(a, b, Objects::equals)); } else if(_NullSafe.size(a) * _NullSafe.size(b) == 0) { assertTrue(_Arrays.testAllMatch(a, b, Objects::equals)); } else if(i!=j) { assertFalse(_Arrays.testAllMatch(a, b, Objects::equals)); } else { assertEquals(i, j); assertTrue(_Arrays.testAllMatch(a, b, Objects::equals)); } }); assertFalse(_Arrays.testAllMatch( new Integer[] {0, 1, 2, 9}, new Integer[] {1, 2, 3, 9}, Objects::equals)); assertFalse(_Arrays.testAllMatch( new Integer[] {0, 1, 2, 3}, new Integer[] {1, 2, 3, 4}, Objects::equals)); }