Checks whether two expressions are comparisons, and are equivalent by reversing one, e.g. "a >= b" vs. "b <= a".
@param e1 First expression
@param e2 second expression
@return Whether both are comparisons, and reversing first comparison equals the second.
978445
private static boolean revComparisonsMatch(AbstractExpression e1, AbstractExpression e2) {
        return e1 instanceof ComparisonExpression &&
                e1.getExpressionType() == ComparisonExpression.reverses.get(e2.getExpressionType()) &&
                new FilterMatcher(((ComparisonExpression) e1).reverseOperator(), e2).match();
    }
166374
@Override
  public int compare(S solution1, S solution2) {
    if (solution1 == null) {
      return 1;
    } else if (solution2 == null) {
      return -1;
    }

    double fitness1 = solutionFitness.getAttribute(solution1);
    double fitness2 = solutionFitness.getAttribute(solution2);
    if (fitness1 < fitness2) {
      return -1;
    }

    if (fitness1 > fitness2) {
      return 1;
    }

    return 0;
  }
667441
public static boolean compareQNames(QName qn1, QName qn2) {
        if (qn1 == qn2)
            return true;
        if (qn1 == null || qn2 == null)
            return false;
        return qn1.equals(qn2);
    }
14131
public static <T> boolean equalsE(T a, T b) {
        if (a == null && b == null) {
            return true;
        }
        if (a != null && b == null) {
            return false;
        }
        if (a == null) {
            return false;
        }
        return a.equals(b);
    }
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);
		}
	}
1273082
public static boolean areStringsEqual(String s1, String s2) {
    return s1 != null && s1.equals(s2) || s1 == null && s2 == null;
  }
836359
private int compare(Reference<E> e1, Reference<E> e2) {
        return comparator.compare(e1.element, e2.element);
    }
743503
public static <T> boolean isEqual(final T first, final T second) {
        /* test to see if they are both null, or both reference the same object */
        if (first == second) return true;

        if (first == null && second != null) return false;

        return first.equals(second);
    }
874679
static void assertEquals(String message, Object comparison1, Object comparison2)
    {
        if(comparison1 == comparison2)
        {
            return;
        }
        if(comparison1.equals(comparison2))
        {
            return;
        }

        System.err.println(message);
    }
420461
public static boolean areEqual(Object value1, Object value2) {
		if (value1 == null && value2 == null)
			return true;
		if (value1 == null || value2 == null)
			return false;
		return value1.equals(value2);
	}
544249
@Override
  public boolean doIsEquals(NormalAnnotationExpr first, NormalAnnotationExpr second) {

    boolean equals = true;

    if (!first.getName().equals(second.getName())) equals = false;

    if (equals == true) {

      if (first.getPairs() == null) return second.getPairs() == null;

      if (!isSmallerHasEqualsInBigger(first.getPairs(), second.getPairs(), true)) return false;

    }

    return equals;
  }
705064
@Pure
	@Inline(value="($1 == $2)", constantExpression=true)
	public static boolean operator_equals(long a, double b) {
		return a == b;
	}
1222033
public static boolean isGreaterOrEqual(BigDecimal bigNum1, BigDecimal bigNum2) {
		Assert.notNull(bigNum1);
		Assert.notNull(bigNum2);
		return bigNum1.compareTo(bigNum2) >= 0;
	}
1161000
public static boolean areEqual(String s1, String s2) {
        return (s1 == null) ? s2 == null : s1.equals(s2);
    }
1036764
private boolean canCompare(CheckBox check1, CheckBox check2) {

        return !((check1 == null) || (check2 == null) || (check1.getData() == check2.getData()));
    }
693350
public static int compareToIgnoreCaseCarefulEquals(String S1, String S2) {
		int diff=S1.compareToIgnoreCase(S2);
		if(diff==0) diff=S1.compareTo(S2);
		return diff;
	}
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;
    }