Class IntCollectionUtil


  • public class IntCollectionUtil
    extends Object
    Utility methods for collections of Integers.
    Author:
    Tilman Neumann
    • Constructor Detail

      • IntCollectionUtil

        public IntCollectionUtil()
    • Method Detail

      • stringToList

        public static ArrayList<Integer> stringToList​(String str)
        Converts the given comma-separated string into a list of Integers.
        Parameters:
        str -
        Returns:
        list of sequence elements
      • max

        public static int max​(Collection<Integer> c)
        Returns the maximum value of the given non-negative integer collection.
        Parameters:
        c - the collection (not null)
        Returns:
        the biggest element, or 0 if the collection is empty