Last active
August 27, 2019 15:19
-
-
Save yavuztas/a5d24ec63e80b55d0f73cfb8dc43bad7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Set<Integer> toSet(int[] array) { | |
return Arrays.stream(array).boxed().collect(Collectors.toSet()); | |
} | |
public static Set<Long> toSet(long[] array) { | |
return Arrays.stream(array).boxed().collect(Collectors.toSet()); | |
} | |
public static Set<Double> toSet(double[] array) { | |
return Arrays.stream(array).boxed().collect(Collectors.toSet()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment