## edu.stanford.nlp.trees
Class SimpleConstituent

    java.lang.Object
      edu.stanford.nlp.trees.Constituent
          edu.stanford.nlp.trees.SimpleConstituent

All Implemented Interfaces:
  Label, Labeled, Scored

Direct Known Subclasses:
  LabeledConstituent

    public class SimpleConstituent

extends Constituent

A `SimpleConstituent` object defines a generic edge in a graph. The `SimpleConstituent` records only the endpoints of the `Constituent`, as two integers. It doesn't label the edges. (It doesn't implement equals() since this actually decreases performance on a non-final class (requires dynamic resolution of which to call).)

Author:
  Christopher Manning

Constructor Summary
`SimpleConstituent()` Create an empty `SimpleConstituent` object.
`SimpleConstituent(int start, int end)` Create a `SimpleConstituent` object with given values.

Method Summary
`ConstituentFactory` `constituentFactory()` Return a factory for this kind of constituent.
`int` `end()` access end node.
`static ConstituentFactory` `factory()` Return a factory for this kind of constituent.
`LabelFactory` `labelFactory()` Return a factory for this kind of label.
`void` `setEnd(int end)` set end node.
`void` `setStart(int start)` set start node.
`int` `start()` access start node.

Methods inherited from class edu.stanford.nlp.trees.Constituent
`contains, crosses, crosses, equals, hashCode, label, labels, score, setFromString, setLabel, setLabels, setScore, setValue, size, toSentenceString, toString, value`

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

Constructor Detail

### SimpleConstituent

    public SimpleConstituent()

  Create an empty `SimpleConstituent` object.

### SimpleConstituent

    public SimpleConstituent(int start,
                             int end)

  Create a `SimpleConstituent` object with given values.

  Parameters:
    `start` - start node of edge
    `end` - end node of edge

Method Detail

### start

    public int start()

  access start node.

  Specified by:
    `start` in class `Constituent`

### setStart

    public void setStart(int start)

  set start node.

  Specified by:
    `setStart` in class `Constituent`

### end

    public int end()

  access end node.

  Specified by:
    `end` in class `Constituent`

### setEnd

    public void setEnd(int end)

  set end node.

  Specified by:
    `setEnd` in class `Constituent`

### labelFactory

    public LabelFactory labelFactory()

  Return a factory for this kind of label. The factory returned is always the same one (a singleton)

  Returns:
    the label factory

### constituentFactory

    public ConstituentFactory constituentFactory()

  Return a factory for this kind of constituent. The factory returned is always the same one (a singleton).

  Returns:
    The constituent factory

### factory

    public static ConstituentFactory factory()

  Return a factory for this kind of constituent. The factory returned is always the same one (a singleton).

  Returns:
    The constituent factory

Stanford NLP Group