public class AttachmentComparator extends Object implements Comparator
Modifier and Type | Field and Description |
---|---|
static String |
COMMENT_SORT |
static String |
CREATION_DATE_SORT |
static String |
FILENAME_SORT |
static String |
MODIFICATION_DATE_SORT |
static String |
SIZE_SORT |
Constructor and Description |
---|
AttachmentComparator(String sortBy,
boolean reverse)
Create an AttachmentComparator that will sort by the specified field.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(Object o1,
Object o2) |
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 static final String FILENAME_SORT
public static final String COMMENT_SORT
public static final String MODIFICATION_DATE_SORT
public static final String CREATION_DATE_SORT
public static final String SIZE_SORT
public AttachmentComparator(String sortBy, boolean reverse)
sortBy
- the field to sort on. If null, or unknown then the default behaviour will be to sort on name.reverse
- reverse the order of the sort.public int compare(Object o1, Object o2)
compare
in interface Comparator
Copyright © 2003–2020 Atlassian. All rights reserved.