Created
December 16, 2012 10:43
-
-
Save martenlienen/4306243 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Style { | |
private boolean bold; | |
private boolean italic; | |
public boolean equals (Object other) { | |
if (other == null || !(other instanceof Style)) { | |
return false; | |
} | |
Style style = (Style)other; | |
return bold == style.bold && italic == style.italic; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment