Class ArrayUtils

java.lang.Object
dev.prozilla.pine.common.array.ArrayUtils

public final class ArrayUtils extends Object
  • Constructor Details

    • ArrayUtils

      public ArrayUtils()
  • Method Details

    • overlaps

      public static <E> boolean overlaps(E[] arrayA, E[] arrayB)
      Checks if two arrays have any overlapping elements.
      Type Parameters:
      E - Type of the array elements
      Parameters:
      arrayA - First array
      arrayB - Second array
      Returns:
      True if any of the elements in arrayA also appear in arrayB.
    • contains

      public static <E> boolean contains(E[] array, E element)
      Checks if an array contains an element.
      Type Parameters:
      E - Type of the array elements
      Returns:
      True if one of the elements of the array is equal to element.