Package at.jku.ssw.fp.sect05_2.workflow
Class Product
- java.lang.Object
-
- at.jku.ssw.fp.sect05_2.workflow.Stuff
-
- at.jku.ssw.fp.sect05_2.workflow.Product
-
public class Product extends Stuff
A product which consists of various stuff and has some treatments.- Author:
- Herbert Praehofer
-
-
Field Summary
Fields Modifier and Type Field Description protected List<Stuff>
ingredients
List of ingredients.-
Fields inherited from class at.jku.ssw.fp.sect05_2.workflow.Stuff
treatments
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Product(Stuff[] ingredients)
Constructor initializing the ingredients of the product.protected
Product(Stuff[] ingredients, Treatment[] treatments)
Constructor initializing the ingredients and the treatments of the product.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Stuff>
getIngrediants()
Gets the ingredients of this product.Product
mix(Stuff stuff)
Creates a new product by mixing a stuff to this product.static Product
of(Stuff... ingredients)
Creates a product from various stuff.String
toString()
-
-
-
Constructor Detail
-
Product
protected Product(Stuff[] ingredients)
Constructor initializing the ingredients of the product.- Parameters:
ingredients
- the ingredients of the product
-
-
Method Detail
-
of
public static Product of(Stuff... ingredients)
Creates a product from various stuff.- Parameters:
ingredients
- the ingredients for the product- Returns:
- the product
-
getIngrediants
public List<Stuff> getIngrediants()
Gets the ingredients of this product.- Returns:
- the ingredients
-
-