Class BeverageNode
- All Implemented Interfaces:
Comparable<GraphNode>
GraphNode
that represents a beverage.
This is simply an AND node with a type of "BEVERAGE". It stores an optional beverage ID into the altId field of the node, which is used in the event that the node ID cannot be the beverage ID because of ID collisions.
Child nodes of a beverage node are typically ingredient nodes. This allows for a single representation of a beverage even if there are multiple ways to pour it. For example, consider a beverage that requires water and Coke. If there are two pumps with Coke, then there are two ways to pour this beverage. This node will be available if either of the two ways to pour Coke are available.
There is no strict requirement that beverages/brands/groups
contain BeverageNode
nodes. This simply exists as a
convenience for most common use cases.
- Since:
- 1.0
- Version:
- 2023-02-10
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBeverageNode
(String beverageId) Creates a beverage node where the givenbeverageId
is both theid
andaltId
of the node.BeverageNode
(String id, String beverageId) Creates a beverage node where theid
of the node is distinct from the associatedbeverageId
. -
Method Summary
Modifier and TypeMethodDescriptionReturns the beverage ID of the node, which is this node'saltId
.toString()
Methods inherited from class com.tccc.kos.ext.dispense.pipeline.beverage.graph.AndNode
computeAvailable, computeVisible
Methods inherited from class com.tccc.kos.ext.dispense.pipeline.beverage.graph.GraphNode
addOverride, compareTo, equals, getAltId, getChildren, getChildrenIds, getClientData, getData, getId, getNote, getOverrides, getParentIds, getType, getVersion, hashCode, isAvailable, isVisible, removeOverride, removeOverride, setAltId, setClientData, setData, setNote, setType
-
Field Details
-
TYPE
- See Also:
-
-
Constructor Details
-
BeverageNode
Creates a beverage node where the givenbeverageId
is both theid
andaltId
of the node.- Parameters:
beverageId
- both ID and altId of the node
-
BeverageNode
Creates a beverage node where theid
of the node is distinct from the associatedbeverageId
. ThebeverageId
is stored in the node'saltId
field.- Parameters:
id
- ID of the nodebeverageId
- beverageId of the node
-
-
Method Details