Jump to content
  • 0

Question

Posted

a class method is same player.put(mpla,mpla); with this class player.set(mpla,mpla);

the first method use protected FastMap<PcInstance> and second use protected FastList<PcInstance>

 

 

11 answers to this question

Recommended Posts

  • 0
Posted

Still, no idea what he wants here :D

 

Btw, as it's a Map, you must have 2 params, Map<L2PcInstance, Long> for example and list uses one List<PcInstance>.

 

Map uses .put

List uses .add

  • 0
Posted

best is putifabsent sweety xD but the main difference is that they are both FastSomething if you want more spesific answer you have to be more spesific in your question

  • 0
Posted

You are comparing a list to a map. A map is a mapping of key/values where list is simply a list of items.

  • 0
Posted

Map player.put(a, b)

List player.add(a)

 

As said above, screw javolution. Work with ArrayList and HashMap instead. 

  • 0
Posted

example:

if (getPlayers().containsKey(player.getObjectId()))
            getPlayers().put(player.getObjectId(), player);

or  getPlayers().remove(player.getObjectId(), player);

Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..