Class Arrays2


  • public class Arrays2
    extends Object
    A collection of utilities for working with Arrays that goes beyond that in the JDK.
    Author:
    Pete Muir
    • Method Detail

      • asSet

        public static <T> Set<T> asSet​(T... array)
        Create a set from an array. If the array contains duplicate objects, the last object in the array will be placed in resultant set.
        Type Parameters:
        T - the type of the objects in the set
        Parameters:
        array - the array from which to create the set
        Returns:
        the created sets