Jump to content
  • 0

Question

Posted

Hello cheaters.

 

I'm trying to adapt some things on aCis and as you know it uses java 8 and instead FastMap it needs HashMap and istead FastList it needs ArrayList.

 

So everytime I replace imports I have some methods which HashMap/ArrayList doesn't have or have another method .for example

 

10ce47b79c.jpg[/img]

 

What are similar methods for these in HashMap? or how can I change it?

 

Thanks in advance.

 

 

 

10 answers to this question

Recommended Posts

  • 0
Posted

Use merge or compute methods for first cases. You can replace the whole for loop content for merge (!containsKey part included)

 

http://java.boot.by/ocpjp8-upgrade-guide/ch06s03.html

 

http://codereview.stackexchange.com/questions/57078/more-elegant-way-to-increment-integers-in-map

entries.merge(vote, 1, (oldValue, one) -> oldValue + one);

About max and result, simply = 0. It iterates over whole map to find values anyway...

  • 0
Posted
  On 6/15/2016 at 8:13 AM, .Elfocrash said:

If you actually understand what a map and a list is then you can pretty much do it yourself.

If I understand I wouldn't ask a question  :happyforever:

  • 0
Posted
  On 6/15/2016 at 8:15 AM, Gam3Master said:

If I understand I wouldn't ask a question  :happyforever:

FastMap.Entry head()
Returns the head entry of this map.
FastMap.Entry getEntry(java.lang.Object key)
Returns the entry with the specified key.

 

Its pretty clear i think. 

  • 0
Posted (edited)
  On 6/15/2016 at 9:32 AM, Tryskell said:

Use merge or compute methods for first cases. You can replace the whole for loop content for merge (!containsKey part included)

 

http://java.boot.by/ocpjp8-upgrade-guide/ch06s03.html

 

http://codereview.stackexchange.com/questions/57078/more-elegant-way-to-increment-integers-in-map

entries.merge(vote, 1, (oldValue, one) -> oldValue + one);

About max and result, simply = 0. It iterates over whole map to find values anyway...

Thanks for response!

 

Sorry for dumb question one more but the final result must be

 

12d5bdee04.jpg[/img]

 

Like this?

Edited by Gam3Master
  • 0
Posted
  On 6/15/2016 at 1:57 PM, Tryskell said:
 temp = null;

 it's pointless. It's the goal of a GC to handle object deletion by itself. Otherwise yup, try and see.

 

Thanks understood. 

 

Thats the case if HashMap is <Integer, Integer> but what if its <L2PcInstance>?

  • 0
Posted
  On 6/15/2016 at 2:13 PM, Gam3Master said:

Thanks understood. 

 

Thats the case if HashMap is <Integer, Integer> but what if its <L2PcInstance>?

 

If that would be a problem, there would have OutOfMemoryException everywhere (or at least cycles would be shorter and shorter and shorter) on aCis.

 

WeakHashMap and WeakReference exist, but if your GC runs while you retrieve your list, you can end with funny results depending how you gonna use it.

Guest
This topic is now closed to further replies.


  • Posts

    • It's not because I'm an admin that he treated me differently. I actually gave him several clients from my side without him even knowing they came from me, and most of them had no issues. I was also waiting 3–4 weeks at times for things I bought from AvE, even when I was in a rush. He still delivered in the end. That said, I'm not defending him blindly. I'm just saying it's unlikely he’d risk scamming someone over 60–100€, especially knowing how quickly word spreads here.
    • For exact same reason - there were accusation that I scammed. When was it? 2016? But in that time, admins actually didn't listen. I got banned, then unbaned (when I prooved I've refunded) but I was trash talking to mods. When few months later same shit happened, Grisom (?) old global mod, banned me anyway. You can read somewhere on forum how I was shitting on him for doing that (from other account because original account was banned) - which was banned too. He is not here anymore I think. Back in the days I was well know for not carring that much if I was talking to mod or admin, I didn't hold my tongue. Now You know. Just like You know - if I delay, I deliver or refund. I'm not a scammer, even if my old time haterz love to repeat themselfs like mantra. I don't care.
    • Okay I respect that but why is your other account banned?   I don't think this happened just because you delayed somebodys work even in 2012
    • Do You understand the fact, I won't scam anyone? Can You grasp such idea?  Second of all, if a random restaurant on Google Maps has 599 positive reviews and few negative ones with 4,8* score, do You ask Google to block it's profile and burn the place down? No? Then why the fuck You are crying about my random delays? If someone can't get a CUSTOM DESIGN on time, I refund. I'm not 16  y.o. anymore. I don't make living out of this L2 bullshit. Never did. Since 2012 I've made shit tons of projects. How many delays did I have? 12? 15? Out of hundrets of projects. Calm Your tits please. If I would actually take 4k euro and NOT deliver and NOT refund - admins can ban me. So don't compare me to Simple. And just so You know, Celestine sent me customers, so it's not like I've worked with him on his account all the time. That's another thing You won't understand. I won't waste anymore time on You and any other cunt who never was my customer but is bitching just because he has nothing better to do in his life. You don't like my work? Hove along, I don't give a shit. 
  • Topics

×
×
  • Create New...