Class Ingr


  • public class Ingr
    extends Stuff
    Basic ingredients for a product produced by a workflow.
    Author:
    Herbert Praehofer
    • Field Detail

      • name

        private final String name
        The name of the ingredient.
      • amount

        private final double amount
        The amount of the ingredient.
    • Constructor Detail

      • Ingr

        private Ingr​(String name,
                     double amount)
        Private constructor initializing name and amount of the ingredient.
        Parameters:
        name - the name of the ingredient
        amount - the amount of the ingredient
    • Method Detail

      • of

        public static Ingr of​(String name,
                              double amount)
        Creates an ingredient with name and amount.
        Parameters:
        name - the name
        amount - the amount
        Returns:
        the ingredient
      • getName

        public String getName()
        Gets the name of this ingredient.
        Returns:
        the name
      • getAmount

        public double getAmount()
        Gets the amount of this ingredient.
        Returns:
        the amount
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object