code: @SuppressWarnings({ "unchecked", "rawtypes" })
      public int compareTo(Object dataCompare)
      { // Override this
          Object data = this.getData();
          if (data == null)
          {
              if (dataCompare == null)
                  return 0; // Both null -> equal
              return -1;  // Anything is larger than a null.
          }
          if (dataCompare == null)
              return +1;  // This data is larger than a null
          try   {
              if (data instanceof Comparable)
                  return ((Comparable)data).compareTo(dataCompare);
          } catch (ClassCastException ex)   {
              // Possibly different data types, do a string compare.
          }
          String strThis = data.toString();
          String strField = dataCompare.toString();
          return strThis.compareTo(strField);
      }
docs: Compare field to this and return < > or = (-,+,0).
  @return compare value.