Class Stuff

  • Direct Known Subclasses:
    Ingr, Product

    public abstract class Stuff
    extends Object
    Base class for ingredients and products. Stuff contains a list of treatments.
    Author:
    Herbert Praehofer
    • Field Detail

      • treatments

        protected final List<Treatment> treatments
        The list of treatments of this stuff
    • Constructor Detail

      • Stuff

        protected Stuff()
        Constructor initializing the list of treatments to be empty.
      • Stuff

        protected Stuff​(Treatment[] treatments)
        Constructor initializing the treatments.
        Parameters:
        treatments - the treatments
    • Method Detail

      • mix

        public Product mix​(Stuff stuff)
        Creates a product by combining this stuff and a given stuff.
        Parameters:
        stuff - the stuff to combine with
        Returns:
        the produce resulting from the combination
      • process

        public Product process​(Treatment treatment)
        Processes this stuff with a treatment.
        Parameters:
        treatment - the treatment to treat this stuff
        Returns:
        the treated product