LabelChanges interface

Represents changes to the labels applied to an object.

The changes are represented as a list of labels to add, and a list of labels to remove.

Construction

Use O.labelChanges().

Interface

function add(labels, options)

Add one or more labels to the list of labels to add.

labels may be an integer, Ref, integer array, Ref array, or a LabelList.

options is optional and may be omitted. If it is the string "with-parents", as well as the labels specified, the parents of the objects referenced by each label will also be included.

The given labels will be deleted from the remove list, if any of those labels are already in that list.

function remove(labels, options)

Add one or more labels to the list of labels to remove.

labels may be an integer, Ref, integer array, Ref array, or a LabelList.

options is optional and may be omitted. If it is the string "with-parents", as well as the labels specified, the parents of the objects referenced by each label will also be included.

The given labels will be deleted from the add list, if any of those labels are already in that list.

function change(labelList)

Return a new LabelList object formed of the labels in the labelList passed in, with labels added and removed according to the add and remove lists.