Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

Commit

Permalink
Merge pull request #49 from docascode/sortToc
Browse files Browse the repository at this point in the history
sort the items in toc.yml
  • Loading branch information
anmeng10101 authored Sep 9, 2020
2 parents c19ece1 + fa37ac1 commit e5a6218
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/com/microsoft/model/TocItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import com.fasterxml.jackson.annotation.JsonProperty;

public class TocItem {
public class TocItem implements Comparable<TocItem>{

private final String uid;
private final String name;
Expand Down Expand Up @@ -53,4 +53,9 @@ public boolean equals(Object o) {

return uid.equals(that.uid);
}

@Override
public int compareTo(TocItem item) {
return this.getUid().compareTo(item.getUid());
}
}

0 comments on commit e5a6218

Please sign in to comment.