Secure FTP Factory

com.jscape.filetransfer
Class FileTransferRemoteSort.FileSizeComparator

java.lang.Object
  extended by com.jscape.filetransfer.FileTransferRemoteSort.FileSizeComparator
All Implemented Interfaces:
java.util.Comparator
Enclosing class:
FileTransferRemoteSort

public static class FileTransferRemoteSort.FileSizeComparator
extends java.lang.Object

Sorts files by filesize.


Constructor Summary
FileTransferRemoteSort.FileSizeComparator()
           
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Compares the file size using the compareTo of Long class.
 boolean equals(java.lang.Object obj)
          equals.
 boolean getAscendent()
          Gets the ascendet value.
 void setAscendent(boolean ascendent)
          Sets the ascendet indicator.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileTransferRemoteSort.FileSizeComparator

public FileTransferRemoteSort.FileSizeComparator()
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Compares the file size using the compareTo of Long class.

Specified by:
compare in interface java.util.Comparator
Parameters:
o1 - The first file will be compared
o2 - The second file will be compared
Returns:
a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

setAscendent

public void setAscendent(boolean ascendent)
Sets the ascendet indicator.

Parameters:
ascendent - The new indicator value

getAscendent

public boolean getAscendent()
Gets the ascendet value.

Returns:
The ascendent indicator

equals

public boolean equals(java.lang.Object obj)
equals.

Specified by:
equals in interface java.util.Comparator
Overrides:
equals in class java.lang.Object
Parameters:
obj - Object
Returns:
boolean

Secure FTP Factory

Copyright © JSCAPE LLC. 1999-2011. All Rights Reserved