code: public int compareTo(WordTag wordTag) {    
      int first = (word != null ? word().compareTo(wordTag.word()) : 0);
      if(first != 0)
        return first;
      else {
        if (tag() == null) {
          if (wordTag.tag() == null)
            return 0;
          else
            return -1;
        }
        return tag().compareTo(wordTag.tag());
      }
    }
docs: Orders first by word, then by tag.
  
  @param wordTag object to compare to
  @return result (positive if <code>this</code> is greater than
  <code>obj</code>, 0 if equal, negative otherwise)