/** * Returns <code>true</code> if this object is equal to the specified * object, and <code>false</code> otherwise. * * @param obj the object (<code>null</code> permitted). * * @return A boolean. */ public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof PlotOrientation)) { return false; } PlotOrientation orientation = (PlotOrientation) obj; if (!this.name.equals(orientation.toString())) { return false; } return true; }