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

so for fastlist is players.add(text) and for fastmap is players.put(text) ?

just i need learng from list about fastlist, fastmap etc.

  • 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 (edited)

tnx all and big tnx to melron with practice he help me full

now can lock topic :)

Edited by tazerman2
  • 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...