2009-09-03 NULL可能性ありの比較 NULLの可能性のあるオブジェクトをeqaulsで比較するとき、 昔は、ごちゃごちゃとif文を書いたものだ。 でも今は。。。 public static <T> boolean eqauls(T t1,T t2){ if (t1==null && t2==null) return true; if (t1 != null && t2 != null) return t1.equals(t2); return false; }