cosmetic changes only (convert tabs to spaces, add braces one line blocks)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130916 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f146a43e76
commit
4c71dedc3a
|
@ -62,7 +62,7 @@ import java.util.Comparator;
|
|||
* other objects.
|
||||
*
|
||||
* @author <a href="mailto:mas@apache.org">Michael A. Smith</a>
|
||||
* @version $Id: NullComparator.java,v 1.4 2002/10/12 22:15:21 scolebourne Exp $
|
||||
* @version $Revision: 1.5 $ $Date: 2003/01/07 18:20:07 $
|
||||
**/
|
||||
public class NullComparator implements Comparator, Serializable {
|
||||
|
||||
|
@ -167,9 +167,9 @@ public class NullComparator implements Comparator, Serializable {
|
|||
* <code>0</code> if <code>o1</code> and <code>o2</code> are equal.
|
||||
**/
|
||||
public int compare(Object o1, Object o2) {
|
||||
if(o1 == o2) return 0;
|
||||
if(o1 == null) return (this.nullsAreHigh ? 1 : -1);
|
||||
if(o2 == null) return (this.nullsAreHigh ? -1 : 1);
|
||||
if(o1 == o2) { return 0; }
|
||||
if(o1 == null) { return (this.nullsAreHigh ? 1 : -1); }
|
||||
if(o2 == null) { return (this.nullsAreHigh ? -1 : 1); }
|
||||
return this.nonNullComparator.compare(o1, o2);
|
||||
}
|
||||
|
||||
|
@ -195,9 +195,9 @@ public class NullComparator implements Comparator, Serializable {
|
|||
* non-<code>null</code> object comparators.
|
||||
**/
|
||||
public boolean equals(Object obj) {
|
||||
if(obj == null) return false;
|
||||
if(obj == this) return true;
|
||||
if(!obj.getClass().equals(this.getClass())) return false;
|
||||
if(obj == null) { return false; }
|
||||
if(obj == this) { return true; }
|
||||
if(!obj.getClass().equals(this.getClass())) { return false; }
|
||||
|
||||
NullComparator other = (NullComparator)obj;
|
||||
|
||||
|
|
Loading…
Reference in New Issue