Package games.stendhal.common
Class KeyedSlotUtil
java.lang.Object
games.stendhal.common.KeyedSlotUtil
utility methods for working with keyed slots
- Author:
- hendrik
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetKeyedSlot(SlotOwner slotOwner, String name, String key) Get a keyed string value on a named slot.static RPObjectgetKeyedSlotObject(SlotOwner slotOwner, String name) Returns the single object of a "keyed slot".static booleansetKeyedSlot(SlotOwner slotOwner, String name, String key, String value) Set a keyed string value on a named slot.
-
Constructor Details
-
KeyedSlotUtil
public KeyedSlotUtil()
-
-
Method Details
-
getKeyedSlotObject
Returns the single object of a "keyed slot".- Parameters:
slotOwner- the object owning the slotname- name of key slot- Returns:
- object or
nullit does not exist
-
getKeyedSlot
Get a keyed string value on a named slot.- Parameters:
slotOwner- the object owning the slotname- The slot name.key- The value key.- Returns:
- The keyed value of the slot, or
nullif not set.
-
setKeyedSlot
Set a keyed string value on a named slot.- Parameters:
slotOwner- the object owning the slotname- The slot name.key- The value key.value- The value to assign (or remove ifnull).- Returns:
trueif value changed,falseif there was a problem.
-