2009-01-23から1日間の記事一覧

やっぱり java の generic にムキムキしちゃうの - Genericな関数の型指定で死亡

class A<T> { static public interface IHashGetter<T> { public int getHash(T t); }; public A() { this(getDefaultHashGetter()); // ※↑コンストラクター A<T>(A.IHashGetter<Object>) は未定義です。 } public A(IHashGetter<T> getter) { // こっちが本線 } static <U> IHashGe</u></t></object></t></t></t>…