• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 01:16
CET 07:16
KST 15:16
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Greatest Players of All Time: Addendum - Dark1Team Liquid Map Contest #2312[ASL22] Finals Preview: Sweet Victory!12[ASL22] Ro4 Preview: Mirror Mirror6[ASL22] Ro8 Preview: Within Reach5
Community News
[BSL23] ProLeague RO82Serral wins 2026 RSL Season Finals12Weekly Cups (Nov 16-22): MaxPax doubles, Dark heats up0BSL 2v2 ProLeague Season 44Weekly Cups (Nov 9-15): Clem and herO take over6
StarCraft 2
General
Greatest Players of All Time: Addendum - Dark Serral wins 2026 RSL Season Finals Best SC2 Parody Song about 2v2? How do you feel about the mass reverts in the 5.0.17 PTR? Weekly Cups (Nov 16-22): MaxPax doubles, Dark heats up
Tourneys
Kung Fu Cup - 2026 Grand Finals (Nov 24-29) RSL goes to London! 2026 Offline Finals Nov 21-22 soO & FanTaSy return! SC2 Kevin Scrim 4v4 (Nov 16) ISSL:Premier#2 Announcement Sparkling Tuna Cup - Weekly Open Tournament
Strategy
[H] ZvP Mid-Late Game: Stalkers Collossi HT
Custom Maps
[G] How to playtest arcade maps Starcraft 2 Advance [D] the control group Simple Questions/Answers
External Content
Mutation # 553 Undermined The PondCast: SC2 News & Results Mutation # 552 Secret Storm Mutation # 551 Robotic Revival
Brood War
General
List of top players active on ShieldBattery BW General Discussion New ASL23 Maps screpdb: new Starcraft reporting tool Matchmaking broken since Nov 24 - v2 relay down
Tourneys
2v2v2v2 Tournament Stage 2: Players BSL 2v2 ProLeague Season 4 Ultimate Battle Event [BSL23] ProLeague RO8
Strategy
Request - 3-factory/fast timings as Terran Pluto's TvP 5Marine 2Medic Push Simple Questions, Simple Answers Infested Terran strategies in 2026
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread The PlayStation 5 Warcraft III: The Frozen Throne Free Space RTS Game, optimised f. Phone/Tablet etc
Dota 2
League of Legends
[TL LoL EUW IHs] Teemo shall perish
Heroes of the Storm
Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
TL Mafia Community Thread
Community
General
The Games Industry And ATVI US Politics Mega-thread The Chess Thread Artificial Intelligence Thread Russo-Ukrainian War Thread
Fan Clubs
INnoVation Fan Club Fan Club Resource Thread
Media & Entertainment
Anime Discussion Thread Movie Discussion!
Sports
Football (Soccer) Thread Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
[Kickstarter] The Roman E…
LUCKY_NOOB
On Parallel Lives in Fascis…
p4NDemik
The time I organised my…
AssyrianKing
Why I built Repalyzer (1.1.…
BlueStar
Innovate or Game Over?
TrAiDoS
ShieldBattery on Mac
Kraekkling
James Bond movies ranking - pa…
Topin
StarCraft improvement
iopq
Customize Sidebar...

Website Feedback

Closed Threads



Active: 11141 users

Official 'what is Dota anymore' discussion - Page 10042

Forum Index > Dota 2 General
Post a Reply
Prev 1 10040 10041 10042 10043 10044 10602 Next
PoulsenB
Profile Joined June 2011
Poland7771 Posts
May 11 2019 17:56 GMT
#200821
Gotta say, I haven't been so invested in a dota tournament in quite some time. I actually watched series other than those with EG.
IdrA fan forever <3 || the clueless one || Marci must be protected at all costs
Firebolt145
Profile Blog Joined May 2010
Lalalaland34510 Posts
May 11 2019 18:47 GMT
#200822
Me too actually, maybe because Liquid is actually doing decent? Or to start getting ready to go to ESL Birmingham whooo
Moderator
PoulsenB
Profile Joined June 2011
Poland7771 Posts
May 11 2019 19:03 GMT
#200823
what's with EG and cliffs hahaha
IdrA fan forever <3 || the clueless one || Marci must be protected at all costs
Faruko
Profile Joined April 2013
Chile34173 Posts
Last Edited: 2019-05-11 22:38:01
May 11 2019 22:29 GMT
#200824
I'm selling my tower pc, the buyer is a Peruvian dude, i told him he can try the pc and started playing a dota 2 match

Damn the guy is fucking good, wtf.

Edit: He fed
Ross was right // "Jesus Christ nahaz is doing shots before my eyes" (Sn0_Man, 2018)
teddyoojo
Profile Blog Joined June 2011
Germany22369 Posts
Last Edited: 2019-05-11 23:07:02
May 11 2019 23:02 GMT
#200825
ok im very confused, is there a way to compare 2 obj with the contains method in java using this hashcode method

+ Show Spoiler +
public class Thing{

public int hashCode(){
return name.hashCode();
}

like whats the best way for this method, which is supposed to check if parameter Thing is in the arraylist, to look?
public boolean isInTheBox(Thing thing){}



(no idea if that is understandable in any way)
Esports historian since 2000. Creator of 'The Universe' and 'The best scrambled Eggs 2013'. Host of 'Star Wars Marathon 2015'. Thinker of 'teddyoojo's Thoughts'. Earths and Moons leading CS:GO expert. Lord of the Rings.
Nevuk
Profile Blog Joined March 2009
United States16280 Posts
May 11 2019 23:28 GMT
#200826
Wouldn't you return "this.hashcode"?
Easiest way to check if something is in an arraylist is the arraylist.contains(thing) method, with streams as the second easiest. What does "best" mean here? Fastest, fewest lines?
teddyoojo
Profile Blog Joined June 2011
Germany22369 Posts
Last Edited: 2019-05-11 23:51:44
May 11 2019 23:45 GMT
#200827
yes but it literally wont work arraylist.contains(thing) it just gives out false instead of true when it should return true T_T

if i return this.hashcode() then theres no point overwriting the hashcode method also it should compare only based on the name therefore the overwriting hashcode method

its hard to explain without showing the relevant parts IDK
Esports historian since 2000. Creator of 'The Universe' and 'The best scrambled Eggs 2013'. Host of 'Star Wars Marathon 2015'. Thinker of 'teddyoojo's Thoughts'. Earths and Moons leading CS:GO expert. Lord of the Rings.
Nevuk
Profile Blog Joined March 2009
United States16280 Posts
Last Edited: 2019-05-11 23:56:47
May 11 2019 23:55 GMT
#200828
This is the easiest:
CurrentAccount conta5 = new CurrentAccount("João Lopes", 3135);
boolean itemExists = lista.stream().anyMatch(c -> c.equals(conta5))

https://stackoverflow.com/questions/4404084/check-if-a-value-exists-in-arraylist

If you can't use java 8 then yeah, you have to overload hashcode and equals methods. Very common task though, lots of examples.
teddyoojo
Profile Blog Joined June 2011
Germany22369 Posts
May 11 2019 23:58 GMT
#200829
well i understand that method but i just want to know why my arraylist.contains(obj) WONT RETURN TRUE T_T_T_T_T_T_T_T_T_
Esports historian since 2000. Creator of 'The Universe' and 'The best scrambled Eggs 2013'. Host of 'Star Wars Marathon 2015'. Thinker of 'teddyoojo's Thoughts'. Earths and Moons leading CS:GO expert. Lord of the Rings.
Nevuk
Profile Blog Joined March 2009
United States16280 Posts
Last Edited: 2019-05-12 00:22:27
May 12 2019 00:09 GMT
#200830
On May 12 2019 08:58 teddyoojo wrote:
well i understand that method but i just want to know why my arraylist.contains(obj) WONT RETURN TRUE T_T_T_T_T_T_T_T_T_

It is because it uses the .equals method underneath the code. This works really well for int and strings, but not for user defined objects.

See here : https://www.geeksforgeeks.org/difference-equals-method-java

Edit:
Basically it is comparing their location in memory rather than their value if it using the default .equals method.
teddyoojo
Profile Blog Joined June 2011
Germany22369 Posts
May 12 2019 00:27 GMT
#200831
but i overloaded the equals method aswell to only take name into consideration
Esports historian since 2000. Creator of 'The Universe' and 'The best scrambled Eggs 2013'. Host of 'Star Wars Marathon 2015'. Thinker of 'teddyoojo's Thoughts'. Earths and Moons leading CS:GO expert. Lord of the Rings.
Nevuk
Profile Blog Joined March 2009
United States16280 Posts
Last Edited: 2019-05-12 01:14:57
May 12 2019 01:04 GMT
#200832
On May 12 2019 09:27 teddyoojo wrote:
but i overloaded the equals method aswell to only take name into consideration

How did you overload it? You would need to override the equals method with the @Override command. In the post earlier you only had the hashcode method. Overriding the hashcode is only a small performance boost after you've overridden the equals method (so there's no reason to ever do it on a modern computer). Well, or if you are using hash lists like hashmap or hashsets.


Your hashcode has to return an int. You can't just do it on the name string, as it can return different values. There are a lot of ways to override it, but usually it involves creating an int as part of the object definition and using this to generate the hashcode.
teddyoojo
Profile Blog Joined June 2011
Germany22369 Posts
May 12 2019 01:14 GMT
#200833
oh my i just noticed that the equals method doesnt override why doesnt it override ???
Esports historian since 2000. Creator of 'The Universe' and 'The best scrambled Eggs 2013'. Host of 'Star Wars Marathon 2015'. Thinker of 'teddyoojo's Thoughts'. Earths and Moons leading CS:GO expert. Lord of the Rings.
Nevuk
Profile Blog Joined March 2009
United States16280 Posts
May 12 2019 01:16 GMT
#200834
On May 12 2019 10:14 teddyoojo wrote:
oh my i just noticed that the equals method doesnt override why doesnt it override ???

At least on eclipse you just have to add @Override before the class definition.

Like this:
@Override
public boolean equals(Object object)
{
boolean sameSame = false;

if (object != null && object instanceof Thing)
{
sameSame = this.value == ((Thing) object).value;
}

return sameSame;
}
teddyoojo
Profile Blog Joined June 2011
Germany22369 Posts
May 12 2019 01:20 GMT
#200835
it just wont let me T_T and normally intellij would @override itself when applicable
Esports historian since 2000. Creator of 'The Universe' and 'The best scrambled Eggs 2013'. Host of 'Star Wars Marathon 2015'. Thinker of 'teddyoojo's Thoughts'. Earths and Moons leading CS:GO expert. Lord of the Rings.
Nevuk
Profile Blog Joined March 2009
United States16280 Posts
May 12 2019 01:23 GMT
#200836
I can only use eclipse at work, but I do think intellij is much better. On eclipse if that happened I would do a clean and rebuild of the project. Alternative is that you don't have the class file setup as a valid object (ie, you are missing a constructor)
teddyoojo
Profile Blog Joined June 2011
Germany22369 Posts
Last Edited: 2019-05-12 01:31:55
May 12 2019 01:26 GMT
#200837
watever its 3.30 and i give up
thanks tho nevuk
Esports historian since 2000. Creator of 'The Universe' and 'The best scrambled Eggs 2013'. Host of 'Star Wars Marathon 2015'. Thinker of 'teddyoojo's Thoughts'. Earths and Moons leading CS:GO expert. Lord of the Rings.
rabidch
Profile Joined January 2010
United States20289 Posts
May 12 2019 04:02 GMT
#200838
one solution is to not use java
LiquidDota StaffOnly a true king can play the King.
Artisreal
Profile Joined June 2009
Germany9235 Posts
May 12 2019 07:57 GMT
#200839
Wohoo liquid! What a day of dota! Fingers crossed that the finals day will be much like yesterday.

Watched most of it while doing housework and two of the last 3 games on my newly wall mounted monitor in my comfy chair with a beer. That was great!

Let's go liquid! Secret seems too strong though!
passive quaranstream fan
PoulsenB
Profile Joined June 2011
Poland7771 Posts
May 12 2019 08:55 GMT
#200840
This Major has been great so far, has that feel of a "mini TI" to it.
IdrA fan forever <3 || the clueless one || Marci must be protected at all costs
Prev 1 10040 10041 10042 10043 10044 10602 Next
Please log in or register to reply.
Live Events Refresh
Next event in 4h 44m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RuFF_SC2 282
StarCraft: Brood War
Rain 1626
Larva 211
Shinee 24
sorry 12
ajuk12(nOOB) 7
Dota 2
NeuroSwarm138
Counter-Strike
fl0m4311
dupreeh208
byalli196
gobbtv110
Other Games
summit1g9961
WinterStarcraft536
JimRising 414
C9.Mang0276
hungrybox228
amsayoshi30
Organizations
Counter-Strike
PGL11309
Other Games
gamesdonequick1190
[ Show 11 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• Migwel
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• lizZardDota2133
League of Legends
• Lourlo1113
• Stunt473
Upcoming Events
Kung Fu Cup
4h 44m
herO vs Solar
Classic vs Rogue
OSC
7h 44m
BSL
13h 44m
Ret vs TerrOr
UltrA vs Bonyth
Kung Fu Cup
1d 4h
BSL
1d 13h
Kyrie vs JDConan
Dewalt vs eOnzErG
Replay Cast
1d 16h
WardiTV Weekly
2 days
Sparkling Tuna Cup
3 days
PiGosaur Cup
3 days
The PondCast
5 days
[ Show More ]
KCM Race Survival
5 days
Replay Cast
5 days
Liquipedia Results

Completed

Sijosae Cup
RSL Offline Finals
Underdog Cup 2026 Div 2-3

Ongoing

Acropolis #5
KCM Race Survival 2026 Season 4
International ShieldBattery League
BSL Season 23
IPSL Winter 2026-27
CSL Season 23: Qualifier 1
Sector 591
CSL Season 23: Qualifier 2
Kung Fu Cup 2026 Grand Finals
Calamity Cup Div. A Season 8
PGL Major Singapore 2026
Stake Ranked Episode 6
BLAST Rivals Fall 2026
IEM Beijing 2026
PGL Masters Bucharest 2026
Stake Ranked Episode 5
1win Private Club #2
Thunderpick World Champ. '26
ESL Pro League Season 24
Stake Ranked Episode 4
1win Private Club #1
Logitech G Play Connect 2026
SL StarSeries Fall 2026

Upcoming

YSL S4
SC4ALL II: Brood War
CSL 2026 Winter (S23) - 3v3
CSL 2026 Winter (S23)
NBSL 2026 Xiamen LAN
BSL 23: Non-Korean Championship
HSC XXX
Stellar Fest 2: Lunar Cup
StarCraft2 Weekly Open Tournament 2026 Grand Finals
SC4ALL II: StarCraft II
IEM Kraków 2027
PGL Bucharest 2027
BLAST Bounty Winter 2027
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.