Implements Player.Events#equals()
It's convenient for testing. PiperOrigin-RevId: 373280130
This commit is contained in:
parent
1da25f5979
commit
b2b6e0ecb5
@ -404,6 +404,23 @@ public interface Player {
|
|||||||
public int get(int index) {
|
public int get(int index) {
|
||||||
return flags.get(index);
|
return flags.get(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return flags.hashCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(@Nullable Object obj) {
|
||||||
|
if (this == obj) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!(obj instanceof Events)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Events other = (Events) obj;
|
||||||
|
return flags.equals(other.flags);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Position info describing a playback position involved in a discontinuity. */
|
/** Position info describing a playback position involved in a discontinuity. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user