Back to project page AndroSol.
The source code is released under:
MIT License
If you think the Android project AndroSol listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package lib.cards.utilities; /*from w w w . java 2s . c o m*/ import java.util.ArrayList; import java.util.List; public class CollectionUtils { public static <T> List<T> intersect(List<T> first, List<T> second) { ArrayList<T> result = new ArrayList<T>(); for (T obj : first) { if (second.contains(obj)) { result.add(obj); } } return result; } public static <T> List<T> toList(T only) { ArrayList<T> result = new ArrayList<T>(); result.add(only); return result; } }