java.lang.Object
com.tccc.kos.ext.freestyle.service.brandset.beans.MixPart

public class MixPart extends Object
The combination of a beverageId and a ratio. A list of these can be passed to the pour engine to pour a blended mix of existing beverages.

The ratio is arbitrary but must be used consistently. For example, it can be considered a fraction between 0-1 or it can be used as a ratio such as 3 (ie. three parts). The engine will simply sum up the ratios to arrive at a total and then compute each volume by dividing the ratio by the total in the mix.

The seqIdx and seqDelay values are only meaningful for sequence mixes where each part is poured sequentially. The seqIdx determines the order and the seqDelay is how long to wait between this part and the next.

Version:
2023-08-14
  • Constructor Details

    • MixPart

      public MixPart()
      Default constructor
    • MixPart

      public MixPart(String bevId, double ratio)
      Create a mix with the specified beverage and ratio
      Parameters:
      bevId - the beverage id
      ratio - the ratio of this beverage in the mix
  • Method Details

    • validate

      public void validate()
      Validate the mix data.
    • getBevId

      public String getBevId()
    • getRatio

      public double getRatio()
    • getSeqDelay

      public int getSeqDelay()
    • getSeqIdx

      public int getSeqIdx()
    • setBevId

      public void setBevId(String bevId)
    • setRatio

      public void setRatio(double ratio)
    • setSeqDelay

      public void setSeqDelay(int seqDelay)
    • setSeqIdx

      public void setSeqIdx(int seqIdx)