I am using the `Comparator` interface to sort objects in ascending order using following code fragment:

```
final List<LinkModelSpi> documentLinks = this.documentLinksModelSpi.getDocumentLinks();

//Add This method for Sorting Document Link View Same Order. Now The application display same links order
// in catalogue administration edit drug window
if (Checks.checkNotNullAndNonEmpty(documentLinks)) {
  if (this.documentLinksModelSpi.getDocumentLinks().iterator().next() instanceof DocumentLinkModelSpi) {
    Collections.sort(documentLinks, (Comparator<? super LinkModelSpi>) new Comparator<DocumentLinkModelImpl>() {
      @Override
      public int compare(DocumentLinkModelImpl o1, DocumentLinkModelImpl o2) {
        return o1.getResource().compareTo(o2.getResource());
      }
    });
  } else {
    Collections.sort(documentLinks, (Comparator<? super LinkModelSpi>) new Comparator<LinkModelImpl>() {
      @Override
      public int compare(LinkModelImpl o1, LinkModelImpl o2) {
        return o1.getResource().compareTo(o2.getResource());
      }
    });
  }
}

//Collections.reverse(documentLinks);
for (final LinkModelSpi documentLinkModelSpi : documentLinks) {
  //noinspection unchecked
  ((DtoPresentationModelSpi<?, MDTO>) documentLinkModelSpi).addPropertyChangeListener(this);
}

```

The final result is this:

[![Given Result](https://i.stack.imgur.com/5Yr8C.png)](https://i.stack.imgur.com/5Yr8C.png)

But I want to sort list like this:

[![expected result](https://i.stack.imgur.com/28Ptl.png)](https://i.stack.imgur.com/28Ptl.png)

Where the links are sorted regardless of case. How can I do this?