Skip to content
Snippets Groups Projects
Commit 3795695f authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Set arrayToArrayList util method

parent 8399a47d
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,9 @@ import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
public class Util {
......@@ -121,4 +123,10 @@ public class Util {
return true;
return false;
}
public static <T> ArrayList<T> arrayToArrayList(T[] array) {
ArrayList<T> list = new ArrayList<>(array.length);
Collections.addAll(list, array);
return list;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment