-
-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'remotes/origin/#219-duplicate-attachmen…
…t-names'
- Loading branch information
Showing
4 changed files
with
42 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/java/org/simplejavamail/internal/util/NaturalEntryKeyComparator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.simplejavamail.internal.util; | ||
|
||
import java.util.Comparator; | ||
import java.util.Map; | ||
|
||
public class NaturalEntryKeyComparator<T extends Comparable<T>> implements Comparator<Map.Entry<T, Object>> { | ||
|
||
public static final NaturalEntryKeyComparator INSTANCE = new NaturalEntryKeyComparator(); | ||
|
||
// TODO Lombok | ||
private NaturalEntryKeyComparator(){ | ||
} | ||
|
||
|
||
@Override | ||
public int compare(Map.Entry<T, Object> o1, Map.Entry<T, Object> o2) { | ||
return o1.getKey().compareTo(o2.getKey()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters