package com.bib.essensbestellungsverwaltung; import java.util.List; /** * Food, used by FoodPlan * one constructor is used to create new foods the other is used to create existing foods from database * @author Malte Schulze Hobeling */ public class Food { private long id; private String name; private String description; private boolean isDessert; private FoodType foodType; private List allergies; public Food(long id, String name, String description, boolean isDessert, FoodType foodType, List allergies) { this.id = id; this.name = name; this.description = description; this.isDessert = isDessert; this.foodType = foodType; this.allergies = allergies; } public Food(String name, String description, boolean isDessert, FoodType foodType, List allergies) { this.id = -1; this.name = name; this.description = description; this.isDessert = isDessert; this.foodType = foodType; this.allergies = allergies; } public long getId() { return id; } public String getName() { return name; } public String getDescription() { return description; } public boolean isDessert() { return isDessert; } public FoodType getFoodType() { return foodType; } public List getAllergies() { return allergies; } @Override public String toString() { return getName(); } }