All language subtitles for 008 Quidditch Game – Part 4 (Tasks 1 and 2)_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian Download
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,830 --> 00:00:02,690 Let's circle back to the Quidditch project. 2 00:00:03,380 --> 00:00:08,420 I ended the last Quidditch lesson by saying that for Hashmark to retrieve the key, it's not enough 3 00:00:08,420 --> 00:00:10,030 for an object to be equal to it. 4 00:00:10,280 --> 00:00:12,320 It must also share the same hash code. 5 00:00:16,210 --> 00:00:19,810 Hash map uses the hash code to find which bucket the key is in. 6 00:00:21,920 --> 00:00:26,780 And after it finds the bucket it can use equals to compare your object against the key. 7 00:00:29,160 --> 00:00:34,420 So when you add an equals method, you must always add a hash code method that assigns equal object 8 00:00:34,420 --> 00:00:35,490 to the same hash code. 9 00:00:35,910 --> 00:00:38,220 If you don't do that, you're going to get bugs. 10 00:00:39,870 --> 00:00:45,570 So here in Team Not Java, since we have an equals method, we must also add a hash code method, public 11 00:00:45,570 --> 00:00:46,650 and tache code. 12 00:00:50,090 --> 00:00:54,830 And here we can use the hash method to assign an object to hash code based on its fields'. 13 00:00:57,910 --> 00:00:59,050 In this case, house. 14 00:01:01,930 --> 00:01:03,070 Keeper seeker. 15 00:01:05,379 --> 00:01:10,720 And from experience, the hash method doesn't work with a race, so pass the string representation of 16 00:01:10,720 --> 00:01:15,790 the array, which is the same thing because equal objects are going to end up having the same Chaser's 17 00:01:15,790 --> 00:01:16,450 string. 18 00:01:16,960 --> 00:01:20,890 Ultimately, this hash method is going to assign equal object to the same hash code. 19 00:01:21,400 --> 00:01:23,350 And now I'm confident that our code should work. 20 00:01:47,340 --> 00:01:53,100 And it does work get score returns, the score for Gryffindor, the parameter we're passing in is equal 21 00:01:53,100 --> 00:01:56,730 to the key that we're interested in, which means they have the same hash code. 22 00:01:57,790 --> 00:01:59,490 We can test set score as well. 23 00:02:02,520 --> 00:02:08,490 And it works at Update's Gryffindor score to 10, the hash map was able to find a key that matches the 24 00:02:08,490 --> 00:02:11,580 hash code and a quality of the one we're passing in. 25 00:02:11,790 --> 00:02:15,000 So it knows that we're trying to update this particular key. 26 00:02:15,570 --> 00:02:17,010 So I really want to stress this. 27 00:02:17,250 --> 00:02:21,750 When you add an equals method, you must always, always add a hash code method. 28 00:02:22,140 --> 00:02:25,380 Otherwise you're going to get bugs from hash based collections. 2784

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.