java.lang.Object
stud.ntnu.idatt1005.pantrypal.models.Model
Direct Known Subclasses:
Grocery, Recipe, Shelf

public abstract class Model extends Object
This is an abstract class representing a model. It contains the key of the model
  • Field Details

    • key

      private final String key
  • Constructor Details

    • Model

      protected Model()
      Default constructor for Model class. Generates a random UUID as the key for the model.
    • Model

      protected Model(String key)
      Constructor for Model class.
      Parameters:
      key - the key of the model
  • Method Details

    • getKey

      public String getKey()
      Gets the string key.
      Returns:
      the key