kopia lustrzana https://github.com/TeamNewPipe/NewPipe
Refactor equals method
rodzic
8080c32b1f
commit
96d731dfc7
|
@ -112,12 +112,11 @@ public abstract class Tab {
|
|||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
if (!(obj instanceof Tab)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return obj instanceof Tab && obj.getClass() == this.getClass()
|
||||
&& ((Tab) obj).getTabId() == this.getTabId();
|
||||
final Tab other = (Tab) obj;
|
||||
return getTabId() == other.getTabId();
|
||||
}
|
||||
|
||||
/*//////////////////////////////////////////////////////////////////////////
|
||||
|
|
Ładowanie…
Reference in New Issue