mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-01-11 01:40:59 +00:00
Refactor equals method
This commit is contained in:
parent
8080c32b1f
commit
96d731dfc7
@ -112,12 +112,11 @@ public abstract class Tab {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(final Object obj) {
|
public boolean equals(final Object obj) {
|
||||||
if (obj == this) {
|
if (!(obj instanceof Tab)) {
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
final Tab other = (Tab) obj;
|
||||||
return obj instanceof Tab && obj.getClass() == this.getClass()
|
return getTabId() == other.getTabId();
|
||||||
&& ((Tab) obj).getTabId() == this.getTabId();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*//////////////////////////////////////////////////////////////////////////
|
/*//////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
Reference in New Issue
Block a user