Demo entry 5395747

ParentListItem

   

Submitted by anonymous on Jun 23, 2016 at 00:00
Language: Java. Code size: 465 Bytes.

public class Recipe implements ParentListItem {
    
    // a recipe contains several ingredients
    private List<Ingredient> mIngredients;
        
    public Recipe(List<Ingredient> ingredients) {
        mIngredients = ingredients;
    }
            
    @Override
    public List<?> getChildItemList() {
        return mIngredients;
    }
                
    @Override
    public boolean isInitiallyExpanded() {
        return false;
    }
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).