Class FilenameSorter
java.lang.Object
com.levigo.jadice.web.demo.common.server.log.FilenameSorter
Compare 2 String objects and use the standard comparison for most of the cases. The special case is for the following
situation: If the prefix before the last "." of both Strings is the same and the postfix is in both cases a number,
like "enterprisedemo.log.4" vs. "enterprisedemo.log.33", sort by only taking the postfix into account.
In the above case "4" would appear before "33" therefore, while the standard sorting would show "33" first.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
FilenameSorter
public FilenameSorter()
-
-
Method Details
-
sortFiles
Sort like described in the class javadoc.- Parameters:
strings
- an array of Strings, intended to be a list of filenames- Returns:
- the sorted objects, stored in a new
ArrayList
-
sortFiles
Sort like described in the class javadoc.
-