Class ItemDetails

java.lang.Object
com.mg105.use_cases.outputds.ItemDetails

public class ItemDetails extends Object
This is a struct like class whose sole purpose is to represent the state of a particular item in the inventory
  • Constructor Details

    • ItemDetails

      public ItemDetails(@NotNull @NotNull String name, @NotNull @NotNull String description, int count, boolean isUsable)
      Create new ItemDetails for an item.
      Parameters:
      name - the name of the item.
      description - the description of the item.
      count - the count of the item.
      isUsable - whether the item is usable.
  • Method Details

    • getCount

      public int getCount()
      The count of the item
      Returns:
      the count of the item
    • getDescription

      @NotNull public @NotNull String getDescription()
      The description of the item
      Returns:
      the description of the item
    • getName

      @NotNull public @NotNull String getName()
      The name of the item
      Returns:
      the name of the item
    • isUsable

      @NotNull public @NotNull Boolean isUsable()
      If the item is usable
      Returns:
      if the item is usable