Package fig.basic

Examples of fig.basic.LispTree.addChild()


    return result.simplify();
  }

  public LispTree toLispTree() {
    LispTree result = LispTree.proto.newList();
    result.addChild("union");
    for (SemType baseType : baseTypes)
      result.addChild(baseType.toLispTree());
    return result;
  }
View Full Code Here


  public LispTree toLispTree() {
    LispTree result = LispTree.proto.newList();
    result.addChild("union");
    for (SemType baseType : baseTypes)
      result.addChild(baseType.toLispTree());
    return result;
  }

  public SemType simplify() {
    if (baseTypes.size() == 0) return SemType.bottomType;
View Full Code Here

  public DescriptionValue(LispTree tree) { this(tree.child(1).value); }
  public DescriptionValue(String value) { this.value = value; }

  public LispTree toLispTree() {
    LispTree tree = LispTree.proto.newList();
    tree.addChild("description");
    tree.addChild(value);
    return tree;
  }

  public double getCompatibility(Value thatValue) {
View Full Code Here

  public DescriptionValue(String value) { this.value = value; }

  public LispTree toLispTree() {
    LispTree tree = LispTree.proto.newList();
    tree.addChild("description");
    tree.addChild(value);
    return tree;
  }

  public double getCompatibility(Value thatValue) {
    // Match the description part of NameValue.
View Full Code Here

    this.child = child;
  }

  public LispTree toLispTree() {
    LispTree tree = LispTree.proto.newList();
    tree.addChild(mode.toString());
    tree.addChild(child.toLispTree());
    return tree;
  }

  public static Mode parseMode(String mode) {
View Full Code Here

  }

  public LispTree toLispTree() {
    LispTree tree = LispTree.proto.newList();
    tree.addChild(mode.toString());
    tree.addChild(child.toLispTree());
    return tree;
  }

  public static Mode parseMode(String mode) {
    if ("count".equals(mode)) return Mode.count;
View Full Code Here

  public NotFormula(Formula child) { this.child = child; }

  public LispTree toLispTree() {
    LispTree tree = LispTree.proto.newList();
    tree.addChild("not");
    tree.addChild(child.toLispTree());
    return tree;
  }

  public Formula map(Function<Formula, Formula> func) {
View Full Code Here

  public NotFormula(Formula child) { this.child = child; }

  public LispTree toLispTree() {
    LispTree tree = LispTree.proto.newList();
    tree.addChild("not");
    tree.addChild(child.toLispTree());
    return tree;
  }

  public Formula map(Function<Formula, Formula> func) {
    Formula result = func.apply(this);
View Full Code Here

    this.description = description;
  }

  public LispTree toLispTree() {
    LispTree tree = LispTree.proto.newList();
    tree.addChild("name");
    tree.addChild(id);
    if (description != null) tree.addChild(description);
    return tree;
  }
View Full Code Here

  }

  public LispTree toLispTree() {
    LispTree tree = LispTree.proto.newList();
    tree.addChild("name");
    tree.addChild(id);
    if (description != null) tree.addChild(description);
    return tree;
  }

  @Override public int hashCode() { return id.hashCode(); }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.