public interface LabelMergeStrategy
A way to merge two labels into one; the actual merge is performed by the
merge(Label, Label)method. Usually, strategies require that the two labels provided are of the same kind (i.e., instances of the same
Labelclass). Moreover, some strategies only accept label of a certain type, and throw an
IllegalArgumentExceptionif the type is wrong.
mergeMerges two given labels; either label may be
null, but not both. Implementing classes may decide to throw an
IllegalArgumentExceptionif the labels provided are not of the same type, or not of a specific type.
first- the first label to be merged.
second- the second label to be merged.
- the resulting label (note that the returned label may be reused by the
implementing class, so users are invited to make a
Label.copy()of it if they need to keep the label in between calls).