## edu.stanford.nlp.trees
Interface Labeled

All Known Implementing Classes:
  Constituent, EmptyTreeLeaf, LabeledConstituent, LabeledScoredTreeNode, SimpleConstituent, SimpleTree, Tree, TreeGraphNode

    public interface Labeled

Interface for Objects which have a `Label`. For instance, they may be hand-classified with one or more tags. Note that it is for things that possess a label via composition, rather than for things that implement the `Label` interface. An implementor might choose to be read-only and throw an UnsupportedOperationException on the setLabel(s)() commands, but should minimally implement both commands to return Label(s).

Author:
  Sep Kamvar, Christopher Manning, Sarah Spikes (sdspikes@cs.stanford.edu) - filled in types

Method Summary
`Label` `label()` Returns the Object's label.
`Collection<Label>` `labels()` Gives back all labels for this thing.
`void` `setLabel(Label label)` Sets the label associated with this object.
`void` `setLabels(Collection<Label> labels)` Sets the labels associated with this object.

Method Detail

### label

    Label label()

  Returns the Object's label.

  Returns:
    One of the labels of the object (if there are multiple labels, preferably the primary label, if it exists). Returns null if there is no label.

### setLabel

    void setLabel(Label label)

  Sets the label associated with this object.

  Parameters:
    `label` - The Label value

### labels

    Collection<Label> labels()

  Gives back all labels for this thing.

  Returns:
    A Collection of the Object's labels. Returns an empty Collection if there are no labels.

### setLabels

    void setLabels(Collection<Label> labels)

  Sets the labels associated with this object.

  Parameters:
    `labels` - The set of Label values

Stanford NLP Group