code: @Override public int compareTo(Resource o)
     {
        int id1 = NumberHelper.getInt(getID());
        int id2 = NumberHelper.getInt(o.getID());
        return ((id1 < id2) ? (-1) : ((id1 == id2) ? 0 : 1));
     }
docs: This method implements the only method in the Comparable interface. This
  allows Resources to be compared and sorted based on their ID value. Note
  that if the MPX/MPP file has been generated by MSP, the ID value will
  always be in the correct sequence. The Unique ID value will not
  necessarily be in the correct sequence as task insertions and deletions
  will change the order.
  
  @param o object to compare this instance with
  @return result of comparison