Marauroa 3.8: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>Madmetzger |
imported>Madmetzger |
||
| Line 69: | Line 69: | ||
To access the map as a whole thing it is possible to obtain a copy via the getMap method. |
To access the map as a whole thing it is possible to obtain a copy via the getMap method. |
||
Map<String, String> theWholeMap = rpobject.getMap(mapname); |
Map<String, String> theWholeMap = rpobject.getMap(mapname); |
||
As a convenience method RPObject can return all maps put together in one map: |
|||
public Map<String, Map<String, String>> maps() |
|||
An example usage of the maps can be found in the [http://arianne.cvs.sourceforge.net/viewvc/arianne/stendhal/src/games/stendhal/server/entity/player/Player.java?revision=1.284.2.1&view=markup Player] class of [[Stendhal]]. The buddies and their online statusses of a player are stored as a map within the player object. The class [http://arianne.cvs.sourceforge.net/viewvc/arianne/stendhal/src/games/stendhal/server/entity/player/PlayerRPClass.java?revision=1.164&view=markup PlayerRPClass] shows how to define a map attribute in a RPClass. |
An example usage of the maps can be found in the [http://arianne.cvs.sourceforge.net/viewvc/arianne/stendhal/src/games/stendhal/server/entity/player/Player.java?revision=1.284.2.1&view=markup Player] class of [[Stendhal]]. The buddies and their online statusses of a player are stored as a map within the player object. The class [http://arianne.cvs.sourceforge.net/viewvc/arianne/stendhal/src/games/stendhal/server/entity/player/PlayerRPClass.java?revision=1.164&view=markup PlayerRPClass] shows how to define a map attribute in a RPClass. |
||