in src/main/java/com/twitter/nodes/LightDarkSwitchNode.java [34:46]
private LightDarkSwitchNode(
Node<Boolean> shouldDarkReadNode,
@Nullable Node<T> darkNode,
@Nullable Node<T> lightNode) {
super(shouldDarkReadNode); // similar to predicate switch node, only depends on the condition
this.shouldDarkReadNode = shouldDarkReadNode;
this.darkNode = darkNode;
this.lightNode = lightNode;
if ((darkNode != null && darkNode.canEmitNull())
|| (lightNode != null && lightNode.canEmitNull())) {
setAllowNull();
}
}