Check for {@code MASTER} or {@code SLAVE} roles and the URI.

@param o1 the first object to be compared.
@param o2 the second object to be compared.
@return {@literal true} if {@code MASTER} or {@code SLAVE} flags changed or the URI changed.
328154
static boolean essentiallyEqualsTo(RedisNodeDescription o1, RedisNodeDescription o2) {

        if (o2 == null) {
            return false;
        }

        if (o1.getRole() != o2.getRole()) {
            return false;
        }

        if (!o1.getUri().equals(o2.getUri())) {
            return false;
        }

        return true;
    }
737086
public static int inconsistentCompare(MimeType o1, MimeType o2) {
        if ((o1 == null) && (o2 == null)) {
            return 0;
        }
        if (o1 == null) {
            return 1;
        }
        if (o2 == null) {
            return -1;
        }
        int wilchCharComparison = compareByWildCardCount(o1, o2);
        if (wilchCharComparison == 0) {
            float q1 = getQ(o1);
            float q2 = getQ(o2);
            if (q1 == q2) {
                return fallBackCompare(o1, o2);
            }
            if (q1 > q2) {
                return -1;
            } else {
                return 1;
            }
        } else {
            return wilchCharComparison;
        }
    }
286563
public int compareTo(Object o)
   {
      MBeanData md = (MBeanData) o;
      String d1 = objectName.getDomain();
      String d2 = md.objectName.getDomain();
      int compare = d1.compareTo(d2);
      if (compare == 0)
      {
         String p1 = objectName.getCanonicalKeyPropertyListString();
         String p2 = md.objectName.getCanonicalKeyPropertyListString();
         compare = p1.compareTo(p2);
      }
      return compare;
   }
32817
public static boolean equalsBuilder(Object object1, Object object2) {
		Set<String> excludeFields = new HashSet<String>();
		for(Field field: object1.getClass().getDeclaredFields()) {
			if(field.isAnnotationPresent(InEquals.class)) {
				InEquals inEquals = field.getAnnotation(InEquals.class);
				if(inEquals.ignore()) {
					excludeFields.add(field.getName());
				}
			}
		}
		return EqualsBuilder.reflectionEquals(object1, object2, excludeFields);
	}
1188385
@Override
    public int compare(DependencyReportDependencyGroupModel o1, DependencyReportDependencyGroupModel o2)
    {
        String path1 = o1.getCanonicalProject().getName();;
        String path2 = o2.getCanonicalProject().getName();;
        return path1.compareTo(path2);
    }
536120
private boolean isEqual(Object o1, Object o2) {
		return o1 == null ? o2 == null : o1.equals(o2);
	}
757828
public static int compare(CharSequence s1, CharSequence s2, IntUnaryOperator op)
    {
        return Streams.compare(s1.codePoints().map(op), s2.codePoints().map(op));
    }
131310
final static boolean valEquals(final Object o1, final Object o2) {
    return (o1 == null ? o2 == null : o1.equals(o2));
  }
1062662
private boolean isEqual(Object o1, Object o2)
    {
        // Both null - they are equal
        if (o1 == null && o2 == null)
        {
            return true;
        }
        // One is null and the other isn't - they are not equal
        if ((o1 == null && o2 != null) || (o1 != null && o2 == null))
        {
            return false;
        }

        // Otherwise fight it out amongst themselves
        return o1.equals(o2);
    }
373050
public static boolean areEqual(Object o1, Object o2) {
        return
            !o1.getClass().isArray() ? o1.equals(o2) :
                o1.getClass() == boolean[].class ? Arrays.equals((boolean[]) o1, (boolean[]) o2) :
                    o1.getClass() == byte[].class ? Arrays.equals((byte[]) o1, (byte[]) o2) :
                        o1.getClass() == char[].class ? Arrays.equals((char[]) o1, (char[]) o2) :
                            o1.getClass() == double[].class ? Arrays.equals(
                                (double[]) o1,
                                (double[]) o2
                            ) :
                                o1.getClass() == float[].class ? Arrays.equals(
                                    (float[]) o1,
                                    (float[]) o2
                                ) :
                                    o1.getClass() == int[].class ? Arrays.equals(
                                        (int[]) o1,
                                        (int[]) o2
                                    ) :
                                        o1.getClass() == long[].class ? Arrays.equals(
                                            (long[]) o1,
                                            (long[]) o2
                                        ) :
                                            o1.getClass() == short[].class ? Arrays.equals(
                                                (short[]) o1,
                                                (short[]) o2
                                            ) :
                                                Arrays.equals(
                                                    (Object[]) o1,
                                                    (Object[]) o2
                                                );
    }
898673
public static boolean objectsNotEqual(final Object one, final Object two) {

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

    }
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;
			}
		}
	}
15289
public int compare(Object o1, Object o2) {
        int m1 = ((int[])o1)[0];
        int m2 = ((int[])o2)[0];
        if (m1 < m2)
            return -1;
        if (m1 == m2)
            return 0;
        return 1;
    }
912600
@Override
    public int compare(SnapshotHistory o1, SnapshotHistory o2) {
        return o1.history.compareTo(o2.history);
    }
816023
public static boolean equalsAny(final Object o1, final Object... o2s) {
        if (o2s != null) {
            for (final Object o2 : o2s) {
                if (o1 == null) {
                    if (o2 == null) {
                        return true;
                    }
                    continue;
                }
                // o1 != null
                if (o1.equals(o2)) {
                    return true;
                }
            }
        } else {
            return o1 == null;
        }
        return false;
    }
1363593
@Override
    public int compare(Snapshot o1, Snapshot o2) {
        return o1.name.compareTo(o2.name);
    }
311400
@SuppressWarnings("unchecked")
    private static <T extends Comparable<T>> int compare(T o1, T o2) {
        if (o1 instanceof PMessage && o2 instanceof PMessage) {
            return compareMessages((PMessage) o1, (PMessage) o2);
        }
        return o1.compareTo(o2);
    }