public int compareTo(Object object) {
    if (this instanceof CycConstant) {
      if (object instanceof CycConstant)
        return this.toString().compareTo(object.toString());
      else if (object instanceof CycNart)
        return this.toString().compareTo(object.toString().substring(1));
      else
        throw new ClassCastException("Must be a CycFort object");
    }
    else {
      if (object instanceof CycNart)
        return this.toString().compareTo(object.toString());
      else if (object instanceof CycConstant)
        return this.toString().substring(1).compareTo(object.toString());
      else
        throw new ClassCastException("Must be a CycFort object");
    }
  }