f7
f7 is a spreadsheet formula execution library
git clone https://git.vogt.world/f7.git
Log | Files | README.md | LICENSE.md
← All files
name: src/main/java/io/protobase/f7/models/LogicalNode.java
-rw-r--r--
845
 1package io.protobase.f7.models;
 2
 3import com.google.common.base.MoreObjects;
 4
 5/**
 6 * Logic node is a wrapper for a boolean.
 7 */
 8public class LogicalNode extends BaseObject implements Node {
 9  public static final LogicalNode TRUE = new LogicalNode(true);
10  public static final LogicalNode FALSE = new LogicalNode(false);
11  private Boolean value;
12
13  /**
14   * New node from boolean.
15   *
16   * @param value to wrap.
17   */
18  private LogicalNode(Boolean value) {
19    this.value = value;
20  }
21
22  /**
23   * Get the value.
24   *
25   * @return boolean.
26   */
27  public Boolean getValue() {
28    return value;
29  }
30
31  @Override
32  public String toString() {
33    return MoreObjects.toStringHelper(this)
34        .add("value", value)
35        .toString();
36  }
37
38  @Override
39  public Object[] significantAttributes() {
40    return new Object[]{
41        value
42    };
43  }
44}