2007-11-24から1日間の記事一覧

Cannot create a generic array of T

public interface IPredicate { boolean evaluate(T input); } public static final T findAll(T[] array , IPredicate match) { ArrayList temp = new ArrayList(); for (T t : array) { if ( match.evaluate(t) ){ temp.add(t); } } × T[] result = new T[…