Compare and is stopped by find the first different value.

@param pvObject1 To comparing first value.
@param pvObject2 To comparing second value.
@return The different betwenn Object1 and Object2, or <code>null</code> if equals.
166993
public CompareResult compare(final Object pvObject1, final Object pvObject2) {
		CompareResult[] lvCompareResults = null;
		lvCompareResults = compareIntern(pvObject1, pvObject2, true);
		CompareResult lvResult = (lvCompareResults == null ? null : lvCompareResults[0]);
		return lvResult;
	}
848897
public static boolean equal(Object obj1, Object obj2) {
//		return (obj1 != null) ? (obj1.equals(obj2)) : (obj2 == null);
		return (obj1 == obj2) || (obj1 != null && obj1.equals(obj2));
	}
898673
public static boolean objectsNotEqual(final Object one, final Object two) {

        return (one == null) ? (two != null) : (!one.equals(two));

    }
1170773
public static <X extends Comparable<? super X>> int compare(X x1, X x2) {
		if (x1 == null) return x2 == null ? 0 : -1;
		return x2 == null ? 1 : x1.compareTo(x2);
	}
507965
@Override
	public int compare(E o1, E o2) {
		return comparator.compare(o2, o1);
	}
265493
public static boolean isEqual(Object obj1, Object obj2) {
        if (obj1 != null) {
            return (obj2 != null) && obj1.equals(obj2);
        } else {
            return obj2 == null;
        }
    }
1322692
@SuppressWarnings("unchecked")
   public static int compare(Object o1, Object o2) {
      if (o1 == null && o2 == null) {
         return 0;
      } else if (o1 == null) {
         return 1;
      } else if (o2 == null) {
         return -1;
      }
      return Cast.<Comparable>as(o1).compareTo(o2);
   }
129897
public int compare(FailOverListener o1, FailOverListener o2) {
		if (o1.equals(o2)) {
			return 0;
		}
		else {
			if (o1.getPriority() > o2.getPriority()) {
				return -1;
			}
			else {
				return 1;
			}
		}
	}
817110
@Override
  public int compare(S solution1, S solution2) {
    int result = rankComparator.compare(solution1, solution2) ;
    if (result == 0) {
      result = NewcrowdingDistanceComparator.compare(solution1, solution2);
    }

    return result;
  }
1349226
public static int compareVersions(String v1, String v2) {
		String s1 = normalisedVersion(v1);
		String s2 = normalisedVersion(v2);
		return s1 != null ? (s2 != null ? s1.compareTo(s2) : 1)
				: (s2 != null ? -1 : 0);
	}
750845
public static <E> boolean checkEq(E obj1, E obj2) {
	if(obj1 == null) return obj2 == null;
	// make sure we do this short-circuit, just in case it's not done by equals
	if(obj1 == obj2) return true;
	return obj1.equals(obj2);
    }
1289156
public static boolean areObjectsEqual(Object obj1, Object obj2) {
        boolean equal = false;
        if(obj1 == null && obj2 == null) {
            equal = true;
        } else {
            if(obj1 != null) {
                if(obj1.equals(obj2)) {
                    equal = true;
                }
            }
        }
        return equal;
    }
313067
public static boolean equal(Object one, Object two) {
		return one == null && two == null || !(one == null || two == null) && (one == two || one.equals(two));
	}
123597
public int compare(final SnomedConcept o1, final SnomedConcept o2) {
        if (o1 == o2) return 0;
        if (o1 != null) {
            if (o2 == null) return 1;
                // need to use BigInteger to compare SNOMED codes since some are fantastically long
            else return new BigInteger(o1.snomedId)
                    .compareTo(new BigInteger(o2.snomedId));
        }
        return -1;
    }
355325
public int compare(Vector3 o1, Vector3 o2) {
		int ans = 0;

		if (o1 != null && o2 != null) {
			Vector3 d1 = o1;
			Vector3 d2 = o2;

			if (d1.x > d2.x)
				return 1;
			if (d1.x < d2.x)
				return -1;
			// x1 == x2
			if (d1.y > d2.y)
				return 1;
			if (d1.y < d2.y)
				return -1;
		} else {
			if (o1 == null && o2 == null)
				return 0;
			if (o1 == null && o2 != null)
				return 1;
			if (o1 != null && o2 == null)
				return -1;
		}
		
		return ans;
	}
1220613
public int compare(final Object a, final Object b) {

        final long awhen = ((Task) (a)).getNextScheduled();
        final long bwhen = ((Task) (b)).getNextScheduled();

        return (awhen < bwhen) ? -1
                               : (awhen == bwhen) ? 0
                                                  : 1;
    }
830588
public static final <T extends Comparable<T>> int comparator(T val1, T val2) {
		if(val1 == null) {
			return val2 == null? 0 : -1;
		} else {
			return val2 == null? 1 : val1.compareTo(val2);
		}
	}