/** * Indicates whether another object is exactly equal to this instance. * @param obj The object to compare to this instance. * @return {@code true} if {@code obj} is an instance of this type and represents the same value as this instance; otherwise, {@code false}. */ @Override public boolean equals(Object obj) { return obj instanceof Rectangular && equalsType((Rectangular) obj); }
/** * Returns {@code true} if the two instances are not exactly equal. * @param left The instance to compare to {@code right}. * @param right The instance to compare to {@code left}. * @return {@code true} if {@code left} does not represent the same value as {@code right}; otherwise, {@code false}. */ @CS2JInfo("This method implements the functionality of the overloaded operator: 'System.Boolean !=(Rectangular,Rectangular)'") public static boolean notEquals(@Nonnull Rectangular left, @Nonnull Rectangular right) { return !left.equalsType(right); }
/** * Returns {@code true} if the two instances are exactly equal. * @param left The instance to compare to {@code right}. * @param right The instance to compare to {@code left}. * @return {@code true} if {@code left} represents the same value as {@code right}; otherwise, {@code false}. */ @CS2JInfo("This method implements the functionality of the overloaded operator: 'System.Boolean ==(Rectangular,Rectangular)'") public static boolean equals(@Nonnull Rectangular left, @Nonnull Rectangular right) { return left.equalsType(right); }