public class AttachmentFileNameCreationDateComparator extends Object implements Comparator<Attachment>
Compares attachments by file name first, and then creation date if the file names are the same.
File name comparison is handled using a Collator
}, so that the results are locale-aware.
Collator
Constructor and Description |
---|
AttachmentFileNameCreationDateComparator(Locale userLocale)
Creates a new instance of this attachment comparator.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(Attachment a1,
Attachment a2) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public AttachmentFileNameCreationDateComparator(Locale userLocale)
userLocale
- The locale to be used to determine order of the file names.public int compare(Attachment a1, Attachment a2)
compare
in interface Comparator<Attachment>
Copyright © 2002-2021 Atlassian. All Rights Reserved.