code: @Override
      public final int compare(T o1, T o2){
          if(o1==o2)
              return 0;
          else if(o1==null)
              return -1;
          else if(o2==null)
              return 1;
          else
              return _compare(o1, o2);
      }
docs: this method can handle nulls ( null&lt;non-null )