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/TextNode.java
-rw-r--r--
752
 1package io.protobase.f7.models;
 2
 3import com.google.common.base.MoreObjects;
 4
 5/**
 6 * Text node is just a wrapper for String.
 7 */
 8public class TextNode extends BaseObject implements Node {
 9  private String value;
10
11  /**
12   * Create new text node from string.
13   *
14   * @param value string.
15   */
16  public TextNode(String value) {
17    this.value = value;
18  }
19
20  /**
21   * Get the un-altered, un-wrapped value.
22   *
23   * @return string.
24   */
25  public String getValue() {
26    return value;
27  }
28
29  @Override
30  public String toString() {
31    return MoreObjects.toStringHelper(this)
32        .add("value", "\"" + value + "\"")
33        .toString();
34  }
35
36  @Override
37  public Object[] significantAttributes() {
38    return new Object[]{
39        value
40    };
41  }
42}