com.atlassian.confluence.util
Class AttachmentComparator

java.lang.Object
  extended by com.atlassian.confluence.util.AttachmentComparator
All Implemented Interfaces:
Comparator

public class AttachmentComparator
extends Object
implements Comparator


Field Summary
static String COMMENT_SORT
           
static String CREATION_DATE_SORT
           
static String FILENAME_SORT
           
static String MODIFICATION_DATE_SORT
           
static String SIZE_SORT
           
 
Constructor Summary
AttachmentComparator(String sortBy, boolean reverse)
          Create an AttachmentComparator that will sort by the specified field.
 
Method Summary
 int compare(Object o1, Object o2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

FILENAME_SORT

public static final String FILENAME_SORT
See Also:
Constant Field Values

COMMENT_SORT

public static final String COMMENT_SORT
See Also:
Constant Field Values

MODIFICATION_DATE_SORT

public static final String MODIFICATION_DATE_SORT
See Also:
Constant Field Values

CREATION_DATE_SORT

public static final String CREATION_DATE_SORT
See Also:
Constant Field Values

SIZE_SORT

public static final String SIZE_SORT
See Also:
Constant Field Values
Constructor Detail

AttachmentComparator

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.
Method Detail

compare

public int compare(Object o1,
                   Object o2)
Specified by:
compare in interface Comparator


Copyright © 2003-2013 Atlassian. All Rights Reserved.