01: /*
02: * ArrayUtil.java
03: *
04: * This file is part of SQL Workbench/J, http://www.sql-workbench.net
05: *
06: * Copyright 2002-2008, Thomas Kellerer
07: * No part of this code maybe reused without the permission of the author
08: *
09: * To contact the author please send an email to: support@sql-workbench.net
10: *
11: */
12: package workbench.util;
13:
14: import java.util.ArrayList;
15: import java.util.List;
16:
17: /**
18: * @author support@sql-workbench.net
19: */
20: public class ArrayUtil {
21:
22: public static <T> List<T> arrayToList(T[] a) {
23: List<T> l = new ArrayList<T>(a.length);
24: for (T o : a) {
25: l.add(o);
26: }
27: return l;
28: }
29:
30: }
|