Class Item

Object
Item

public class Item extends Object
Author:
maartenl
  • Constructor Details

    • Item

      public Item(Item item)
  • Method Details

    • getId

      public Integer getId()
    • getItemdef

      public Long getItemdef()
    • getName

      public String getName()
    • getDescription

      public String getDescription()
    • getAttribute

      public String getAttribute(String name)
    • setAttribute

      public void setAttribute(String name, String value)
    • isAttribute

      public boolean isAttribute(String name)
    • removeAttribute

      public boolean removeAttribute(String name)
    • addItem

      public Item addItem(Item item)
      Adds a new item to this bag. With new it is understood that the item was created with a call to Items.createItem(int), and is not yet allocated to a room, person or container.
      Parameters:
      item - the new item to add.
      Returns:
      the exact same item, or null if unable to comply.
    • removeItem

      public void removeItem(Item item)
      Actually destroys an item from this container.
      Parameters:
      item - the new item to destroy.