code: public int compareTo(NameValuePair<T> other) {
          String otherName = other.mName;
  
          if (mName == null) {
              return otherName == null ? 0 : 1;
          }
  
          if (otherName == null) {
              return -1;
          }
  
          return mName.compareToIgnoreCase(otherName);
      }
docs: Comparison is based on case-insensitive ordering of "name".