public class

AttachmentComparator

extends Object
implements Comparator<T>
java.lang.Object
   ↳ com.atlassian.confluence.util.AttachmentComparator

Summary

Constants
String COMMENT_SORT
String CREATION_DATE_SORT
String FILENAME_SORT
String MODIFICATION_DATE_SORT
String SIZE_SORT
Public Constructors
AttachmentComparator(String sortBy, boolean reverse)
Create an AttachmentComparator that will sort by the specified field.
Public Methods
int compare(Object o1, Object o2)
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.util.Comparator

Constants

public static final String COMMENT_SORT

Constant Value: "comment"

public static final String CREATION_DATE_SORT

Constant Value: "createddate"

public static final String FILENAME_SORT

Constant Value: "name"

public static final String MODIFICATION_DATE_SORT

Constant Value: "date"

public static final String SIZE_SORT

Constant Value: "size"

Public Constructors

public AttachmentComparator (String sortBy, boolean reverse)

Create an AttachmentComparator that will sort by the specified field.

Parameters
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 Methods

public int compare (Object o1, Object o2)