Class KeyedSlotUtil

java.lang.Object
games.stendhal.common.KeyedSlotUtil

public class KeyedSlotUtil extends Object
utility methods for working with keyed slots
Author:
hendrik
  • Constructor Details

    • KeyedSlotUtil

      public KeyedSlotUtil()
  • Method Details

    • getKeyedSlotObject

      public static RPObject getKeyedSlotObject(SlotOwner slotOwner, String name)
      Returns the single object of a "keyed slot".
      Parameters:
      slotOwner - the object owning the slot
      name - name of key slot
      Returns:
      object or null it does not exist
    • getKeyedSlot

      public static String getKeyedSlot(SlotOwner slotOwner, String name, String key)
      Get a keyed string value on a named slot.
      Parameters:
      slotOwner - the object owning the slot
      name - The slot name.
      key - The value key.
      Returns:
      The keyed value of the slot, or null if not set.
    • setKeyedSlot

      public static boolean setKeyedSlot(SlotOwner slotOwner, String name, String key, String value)
      Set a keyed string value on a named slot.
      Parameters:
      slotOwner - the object owning the slot
      name - The slot name.
      key - The value key.
      value - The value to assign (or remove if null).
      Returns:
      true if value changed, false if there was a problem.