Make the equals() method a little more Java-ish