1 package junitx.ddtunit.data; 2 3 import java.util.Comparator; 4 5 public class DefaultComparator implements Comparator<Object> { 6 public int compare(Object object1, Object object2) { 7 if (object1 == null && object2 == null) { 8 return 0; 9 } 10 if (object1 == null || object2 == null) { 11 return -1; 12 } 13 if (object1.equals(object2)) { 14 return 0; 15 } else { 16 return -1; 17 } 18 } 19 }