Javadocs

AndNode

Summary

public class AndNode extends GraphNode

Description

A GraphNode that reports availability as the logical AND of all of its child nodes. That is, this node is available/visible only if all all of its child nodes are available/visible.

This is useful for all-or-nothing relationships, such as a beverage only being available when all ingredients required by the beverage are available.

The default type of this node is "AND", but a custom type can be used to allow for improved searchability.

Constructors

C1

public AndNode(String id)

Creates an AND node with the specified ID and a type of "AND".

id String : the ID of the node

C2

public AndNode(String type, String id)

Creates an AND node with the specified ID and type.

Although the node has the specified type name, it still functions as an AND node. This is useful for creating a layer of AND nodes in a graph that can be easily searched by type.

type String : the type of the node

id String : the ID of the node

Methods

computeVisible

public boolean computeVisible()

Computes this node’s visibility.

An AND node is visible only when all of its child nodes are visible.

boolean

computeAvailable

public boolean computeAvailable()

Computes this node’s availability.

An AND node is available only when all of its child nodes are available.

boolean

Previous
Next
On this page
Java Development
Seamlessly transition from Legacy+ systems to Freestyle microdosing and advanced distributed dispense systems.
UI Development
Using KOS SDKs, integrating Consumer and Non-consumer facing UIs becomes seamless, giving you less hassle and more time to create.
Video Library
Meet some of our development team, as they lead you through the tools, features, and tips and tricks of various KOS tools.
Resources
Familiarize yourself with KOS terminology, our reference materials, and explore additional resources that complement your KOS journey.
Copyright © 2024 TCCC. All rights reserved.