public interface Labeled
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).Modifier and Type | Method and Description |
---|---|
Label |
label()
Returns the Object's label.
|
java.util.Collection<Label> |
labels()
Gives back all labels for this thing.
|
void |
setLabel(Label label)
Sets the label associated with this object.
|
void |
setLabels(java.util.Collection<Label> labels)
Sets the labels associated with this object.
|
Label label()
void setLabel(Label label)
label
- The Label valuejava.util.Collection<Label> labels()
void setLabels(java.util.Collection<Label> labels)
labels
- The set of Label values