@ Override public int compare ( final T o1 , final T o2 ) { int result = 0 ; if ( o1 == null ) { if ( o2 != null ) { result = - 1 ; } } else if ( o2 == null ) { result = 1 ; } else { result = compareType ( o1 , o2 ) ; } return result ; }
Compares two objects null safe to each other .