code: @Override
    public int compareTo(Attachment o) {
      int result = this.label.compareTo(o.getLabel());
      if (result != 0)
        return result;
      result = this.getCurrentIndex() - o.getCurrentIndex();
      if (result != 0) {
        return result / Math.abs(result);
      }
      return 0;
    }
docs: {@inheritDoc}