Package picocli.codegen.docgen.manpage
Class ManPageGenerator.ShortestFirst
- java.lang.Object
-
- picocli.codegen.docgen.manpage.ManPageGenerator.ShortestFirst
-
- All Implemented Interfaces:
java.util.Comparator<java.lang.String>
- Enclosing class:
- ManPageGenerator
static class ManPageGenerator.ShortestFirst extends java.lang.Object implements java.util.Comparator<java.lang.String>
Sorts short strings before longer strings.
-
-
Constructor Summary
Constructors Constructor Description ShortestFirst()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(java.lang.String o1, java.lang.String o2)
static java.lang.String[]
longestFirst(java.lang.String[] names)
Sorts the specified array of Strings longest-first and returns it.static java.lang.String[]
sort(java.lang.String[] names)
Sorts the specified array of Strings shortest-first and returns it.
-
-
-
Method Detail
-
compare
public int compare(java.lang.String o1, java.lang.String o2)
- Specified by:
compare
in interfacejava.util.Comparator<java.lang.String>
-
sort
public static java.lang.String[] sort(java.lang.String[] names)
Sorts the specified array of Strings shortest-first and returns it.
-
longestFirst
public static java.lang.String[] longestFirst(java.lang.String[] names)
Sorts the specified array of Strings longest-first and returns it.
-
-