|
What this is
Other links
The source codepackage org.netbeans.modules.tasklist.usertasks.treetable; import java.util.Comparator; /** * Compares Boolean values */ public class BooleanComparator 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; boolean b1 = ((Boolean) o1).booleanValue(); boolean b2 = ((Boolean) o2).booleanValue(); if (b1 == b2) return 0; if (b1) return 1; else return -1; } } |
... 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.