import java.awt.geom.Ellipse2D;
public class Main {
/**
* Compares two ellipses and returns true
if they are equal or
* both null
.
*
* @param e1 the first ellipse (null
permitted).
* @param e2 the second ellipse (null
permitted).
*
* @return A boolean.
*/
public static boolean equal(final Ellipse2D e1, final Ellipse2D e2) {
if (e1 == null) {
return (e2 == null);
}
if (e2 == null) {
return false;
}
if (!e1.getFrame().equals(e2.getFrame())) {
return false;
}
return true;
}
}