by
160 9
0
6
3,967
0
Top 1% !
Popular
Famous
Tagged
Specified
OpenSource
Popularity: 2585th place
Languagescala
LicenseMIT_X11

equalTo() - override

equalTo() - override descr
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/1036526/equalTo()---override?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
import org.apache.commons.lang3.builder.EqualsBuilder; class Cake { String type; public Cake(String type) { this.type = type; } @Override public boolean equals(Object obj) { if (!(obj instanceof Cake)) { return false; } else if (obj == this) { return true; } Cake rhs = (Cake) obj; return new EqualsBuilder().append(type, rhs.type).isEquals(); } }
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus