Class ListUtilities


public class ListUtilities
Utility class for various list operations. This class cannot be instantiated.
  • Method Details

    • containsInstance

      public static <E> boolean containsInstance(List<E> list, Class<? extends E> clazz)
      Checks if the list contains an instance of the specified class.
      Type Parameters:
      E - the type of elements in the list
      Parameters:
      list - the list to check
      clazz - the class to check for instances of
      Returns:
      true if the list contains an instance of the specified class, false otherwise
    • getIntList

      public static List<Integer> getIntList(int... values)
      Converts an array of int values to a list of Integer objects.
      Parameters:
      values - the array of int values
      Returns:
      a list of Integer objects