code: public void setLabels(Collection<LabelType> labels) {
      this.labels.clear();
      if (labels != null) {
        this.labels.addAll(labels);
      }
    }
docs: Removes all currently assigned labels for this Datum then adds all
  of the given Labels.