Package org.apache.sling.fsprovider.internal.mapper

# Class FileNameComparator

java.lang.Object
org.apache.sling.fsprovider.internal.mapper.FileNameComparator

All Implemented Interfaces:
  `Comparator<File>`

public class FileNameComparator extends Object implements Comparator<File>
Comparator sorting files by filename. Intended to be used for comparing sibling files (i.e. files within the same folder).

## Field Summary

Fields
Modifier and Type
Field
Description
`static final Comparator<File>`
`INSTANCE`

## Method Summary

Modifier and Type
Method
Description
`int`
`compare(File f1, File f2)`

### 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, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

## Field Details

### INSTANCE

public static final Comparator<File> INSTANCE

## Method Details

### compare

public int compare(File f1, File f2)

Specified by:
  `compare` in interface `Comparator<File>`