com.jscape.filetransfer

## Class FileTransferRemoteSort.FileNameComparator

- java.lang.Object
- - com.jscape.filetransfer.FileTransferRemoteSort.FileTransferRemoteComparator
  - - com.jscape.filetransfer.FileTransferRemoteSort.FileNameComparator

- All Implemented Interfaces:
    java.util.Comparator
  Enclosing class:
    FileTransferRemoteSort

      public static class FileTransferRemoteSort.FileNameComparator
      extends FileTransferRemoteSort.FileTransferRemoteComparator

  Sorts files by name.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileNameComparator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(java.lang.Object o1, java.lang.Object o2)` Compares the file name of both FileTransferRemoteFile arguments.

    - ### Methods inherited from class com.jscape.filetransfer.FileTransferRemoteSort.FileTransferRemoteComparator

      `equals, getAscendent, hashCode, setAscendent`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.util.Comparator

      `comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- - ### Constructor Detail

    - #### FileNameComparator

          public FileNameComparator()

  - ### Method Detail

    - #### compare

          public int compare(java.lang.Object o1,
                             java.lang.Object o2)

      Compares the file name of both FileTransferRemoteFile arguments. Compares to string using the compareToIgnoreCase function
      Specified by:
        `compare` in interface `java.util.Comparator`
      Specified by:
        `compare` in class `FileTransferRemoteSort.FileTransferRemoteComparator`
      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.

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