public Recipe(String name, int time, int calories, String source, List<RecipeSection> sections, int portions){

		if(name == null){
		    this.name = "";
		} else {
			this.name = name;
		}
		this.time = time;
		this.calories = calories;
		if(source == null){
			this.source = "";
		} else {
		this.source = source;
		}
		if(sections == null){
			this.sections = new LinkedList<>();
		} else {
		this.sections = sections;
		}

        if ( portions <= 0 ){
            throw new IllegalArgumentException("The recipe has to have a positive portions size");
        }
        this.portions = portions;
	}