mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Make Track[Group|GroupArray|Selection] consistent.
- I don't think the length is useful in hashCode; if the length is different then Arrays.hashCode should account for that. - "this." just for consistency across these classes. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=116641142
This commit is contained in:
parent
00191848f7
commit
9c98c4bb10
2 changed files with 2 additions and 6 deletions
|
|
@ -58,7 +58,7 @@ public final class TrackGroup {
|
||||||
Assertions.checkState(formats.length > 0);
|
Assertions.checkState(formats.length > 0);
|
||||||
this.adaptive = adaptive;
|
this.adaptive = adaptive;
|
||||||
this.formats = formats;
|
this.formats = formats;
|
||||||
length = formats.length;
|
this.length = formats.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -77,7 +77,6 @@ public final class TrackGroup {
|
||||||
int result = 17;
|
int result = 17;
|
||||||
result = 31 * result + (adaptive ? 1231 : 1237);
|
result = 31 * result + (adaptive ? 1231 : 1237);
|
||||||
result = 31 * result + Arrays.hashCode(formats);
|
result = 31 * result + Arrays.hashCode(formats);
|
||||||
result = 31 * result + length;
|
|
||||||
hashCode = result;
|
hashCode = result;
|
||||||
}
|
}
|
||||||
return hashCode;
|
return hashCode;
|
||||||
|
|
|
||||||
|
|
@ -53,10 +53,7 @@ public final class TrackGroupArray {
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
if (hashCode == 0) {
|
if (hashCode == 0) {
|
||||||
int result = 17;
|
hashCode = Arrays.hashCode(trackGroups);
|
||||||
result = 31 * result + Arrays.hashCode(trackGroups);
|
|
||||||
result = 31 * result + length;
|
|
||||||
hashCode = result;
|
|
||||||
}
|
}
|
||||||
return hashCode;
|
return hashCode;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue