Skip to content
Snippets Groups Projects
MenuSalades.java 611 B
Newer Older
benjamin.sitbon's avatar
benjamin.sitbon committed


public class MenuSalades extends Menu {

    

    public void add(Legume l){
        LegumeSalades sal = (LegumeSalades) l;
        this.menu.add(sal);
    }

    public void add(Herbe he){
        HerbeSalades sal = (HerbeSalades) he;
        this.menu.add(sal);
    }

    public void add(Huile hu){
        HuileSalades sal = (HuileSalades) hu;
        this.menu.add(sal);
    }


    public void addAll(Ingredient... ingredients){
        for(Ingredient l: ingredients){
            this.menu.add(l);
        }
    }
    public Ingredient get(int index){
        return this.menu.get(index);
    }
    
}