## edu.stanford.nlp.trees
Class SimpleTree

    java.lang.Object
      java.util.AbstractCollection<Tree>
          edu.stanford.nlp.trees.Tree
              edu.stanford.nlp.trees.SimpleTree

All Implemented Interfaces:
  Label, Labeled, Scored, Serializable, Iterable<Tree>, Collection<Tree>

    public class SimpleTree

extends Tree

A `SimpleTree` is a minimal concrete implementation of an unlabeled, unscored `Tree`. It has a tree structure, but no annotation at nodes.

Author:
  Christopher Manning
See Also:
  Serialized Form

Field Summary

Fields inherited from class edu.stanford.nlp.trees.Tree
`DISPLAY_SCORES, EMPTY_TREE_ARRAY`

Constructor Summary
`SimpleTree()` Create an empty parse tree.
`SimpleTree(Label label)` Create parse tree with given root and null daughters.
`SimpleTree(Label label, List<Tree> daughterTreesList)` Create parse tree with given root and array of daughter trees.

Method Summary
`Tree[]` `children()` Returns an array of children for the current node, or null if it is a leaf.
`static TreeFactory` `factory()` Return a `TreeFactory` that produces trees of the `SimpleTree` type.
`void` `setChildren(Tree[] children)` Sets the children of this `Tree`.
`TreeFactory` `treeFactory()` Return a `TreeFactory` that produces trees of the `SimpleTree` type.

Methods inherited from class edu.stanford.nlp.trees.Tree

`addChild, addChild, ancestor, cCommands, constituents, constituents, constituents, deepCopy, deepCopy, deepCopy, dependencies, dependencies, dependencies, dependencies, depth, depth, dominates, dominationPath, equals, firstChild, flatten, flatten, getChild, getChildrenAsList, getLeaves, getLeaves, getNodeNumber, getSpan, hashCode, headPreTerminal, headTerminal, headTerminal, indentedListPrint, indentedListPrint, indexLeaves, indexOf, indexSpans, indexSpans, insertDtr, isLeaf, isPhrasal, isPrePreTerminal, isPreTerminal, isUnaryRewrite, iterator, joinNode, label, labeledYield, labeledYield, labelFactory, labels, lastChild, leftCharEdge, localTree, localTrees, mapDependencies, mapDependencies, nodeNumber, nodeString, numChildren, parent, parent, pathNodeToNode, pennPrint, pennPrint, pennPrint, pennString, percolateHeads, postOrderNodeList, preOrderNodeList, preTerminalYield, preTerminalYield, printLocalTree, printLocalTree, prune, prune, removeChild, rightCharEdge, score, setChild, setChildren, setFromString, setLabel, setLabels, setScore, setSpans, setValue, siblings, size, skipRoot, spliceOut, spliceOut, subTreeList, subTrees, subTrees, taggedDependencies, taggedDependencies, taggedDependencies, taggedDependencies, taggedLabeledYield, taggedYield, taggedYield, toString, toStringBuilder, toStringBuilder, toStructureDebugString, transform, transform, treeSkeletonCopy, treeSkeletonCopy, upperMostUnary, value, valueOf, valueOf, yield, yield, yield, yieldHasWord, yieldHasWord, yieldWords, yieldWords`

Methods inherited from class java.util.AbstractCollection
`add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SimpleTree

    public SimpleTree()

  Create an empty parse tree.

### SimpleTree

    public SimpleTree(Label label)

  Create parse tree with given root and null daughters.

  Parameters:
    `label` - root label of new tree to construct. For a SimpleTree this parameter is ignored.

### SimpleTree

    public SimpleTree(Label label,
                      List<Tree> daughterTreesList)

  Create parse tree with given root and array of daughter trees.

  Parameters:
    `label` - root label of tree to construct. For a SimpleTree this parameter is ignored
    `daughterTreesList` - list of daughter trees to construct.

Method Detail

### children

    public Tree[] children()

  Returns an array of children for the current node, or null if it is a leaf.

  Specified by:
    `children` in class `Tree`
  Returns:
    The children of the node
  See Also:
    `Tree.getChildrenAsList()`

### setChildren

    public void setChildren(Tree[] children)

  Sets the children of this `Tree`. If given `null`, this method sets the Tree's children to a unique zero-length Tree[] array.

  Overrides:
    `setChildren` in class `Tree`
  Parameters:
    `children` - An array of child trees
  See Also:
    `Tree.setChildren(List)`

### treeFactory

    public TreeFactory treeFactory()

  Return a `TreeFactory` that produces trees of the `SimpleTree` type. The factory returned is always the same one (a singleton).

  Specified by:
    `treeFactory` in class `Tree`
  Returns:
    a factory to produce simple (unlabelled) trees

### factory

    public static TreeFactory factory()

  Return a `TreeFactory` that produces trees of the `SimpleTree` type. The factory returned is always the same one (a singleton).

  Returns:
    a factory to produce simple (unlabelled) trees

Stanford NLP Group