public abstract class LabelableElementImpl extends Object implements LabelableElement, Serializable
Label
objects.| Modifier and Type | Field and Description |
|---|---|
protected LabelableElement |
delegate
A delegate object of the same type.
|
static int |
EXPECTED_NUMBER_OF_LABELS
Determines the expected number of labels.
|
| Constructor and Description |
|---|
LabelableElementImpl() |
LabelableElementImpl(LabelableElement delegatee)
Initializes a new object and sets an internal delegate.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLabel(Label label)
Adds the given Label object to the list of labels.
|
void |
basicAddLabel(Label label)
This is an internally used method.
|
void |
basicRemoveLabel(String qName)
This is an internally used method.
|
boolean |
containsLabel(String qName)
Checks if this object has a Label object in its list having the given
qualified name.
|
protected LabelableElement |
getDelegate()
Returns the delegate object.
|
Label |
getLabel(String qName)
Returns a label having the passed qualified name.
|
Label |
getLabel(String namespace,
String name) |
Collection<Label> |
getLabels()
Returns all labels being contained by this object.
|
Set<Label> |
getLabelsByNamespace(String namespace)
Returns a set containing all Label objects having the given namespace.
|
void |
removeAll()
Removes all
Label objects. |
void |
removeLabel(String qName)
Removes the label having the passed qName.
|
void |
removeLabel(String namespace,
String name)
Removes a Label object from the list of labels of this object.
|
Integer |
sizeLabels()
returns the number of
Label objects contained by this object. |
public static final int EXPECTED_NUMBER_OF_LABELS
protected LabelableElement delegate
public LabelableElementImpl()
public LabelableElementImpl(LabelableElement delegatee)
delegatee - object to pass method invocations to.protected LabelableElement getDelegate()
delegate is not null, all
functions of this method are delegated to the delegate object. Setting
delegate makes this object to a container.public Collection<Label> getLabels()
getLabels in interface LabelableElementLabel objectspublic Label getLabel(String qName)
getLabel in interface LabelableElementqName - the qualified name to be splittedLabel objectpublic Label getLabel(String namespace, String name)
getLabel in interface LabelableElementnamespace - namespace of the Label to be searched forname - name of the Label to be searched forLabel objectpublic Set<Label> getLabelsByNamespace(String namespace)
Label was found or the passed namespace was empty, an
empty list is returned.getLabelsByNamespace in interface LabelableElementpublic void addLabel(Label label)
addLabel in interface LabelableElementlabel - the Label object to be addedpublic void basicAddLabel(Label label)
LabelableElement and label object. When a label is
inserted into this container and to avoid an endless invocation the
insertion of a label is split into the two methods
addLabel(Label) and basicAddLabel(Label). The
invocation of methods is implement as follows:
That means methodaddLabel(Label)Label.setContainer(LabelableElement)|| \ / || || X || \/ / \ \/basicAddLabel(Label)LabelImpl.basicSetLabelableElement(LabelableElement)
addLabel(Label) calls
basicAddLabel(Label) and Label#basicSetGraph(Graph). And
method Label.setContainer(LabelableElement) calls
basicAddLabel(Label) and
LabelImpl.basicSetLabelableElement(LabelableElement).label - label to be insertedpublic void removeLabel(String qName)
removeLabel in interface LabelableElementqName - qualified name of the Label to be removedpublic void basicRemoveLabel(String qName)
LabelableElement and label object. When a label is
inserted into this container and to avoid an endless invocation the
insertion of a label is split into the two methods
removeLabel(String) and basicRemoveLabel(String). The
invocation of methods is implement as follows:
That means methodremoveLabel(String)Label.setContainer(LabelableElement)|| \ / || || X || \/ / \ \/#basicRemoveLabel(STring)LabelImpl.basicSetLabelableElement(LabelableElement)
removeLabel(String) calls
basicRemoveLabel(String) and Label#basicSetGraph(Graph).
And method Label.setContainer(LabelableElement) calls
basicRemoveLabel(String) and
LabelImpl.basicSetLabelableElement(LabelableElement).label - label to be insertedpublic void removeLabel(String namespace, String name)
removeLabel in interface LabelableElementnamespace - the namespace of the object to be removedname - the name of the object to be removedpublic void removeAll()
Label objects.removeAll in interface LabelableElementpublic boolean containsLabel(String qName)
containsLabel in interface LabelableElementpublic Integer sizeLabels()
Label objects contained by this object.sizeLabels in interface LabelableElementLabel objectsCopyright © 2009–2019 Humboldt-Universität zu Berlin, INRIA. All rights reserved.