|
What this is
Other links
The source codepackage org.netbeans.modules.tasklist.usertasks.treetable; import java.util.Comparator; /** * Compares strings */ public class StringIgnoreCaseComparator implements Comparator { public int compare(java.lang.Object o1, java.lang.Object o2) { if (o1 == null && o2 == null) return 0; if (o1 == null) return -1; if (o2 == null) return 1; return ((String) o1).compareToIgnoreCase((String) o2); } } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.