cdc.mf.model.MfAbstractBasicElement Maven / Gradle / Ivy
package cdc.mf.model;
import java.util.Collection;
import java.util.Set;
/**
* Base class of children elements that can have a name, stereotypes, tags.
*
* They also can have an identifier and documentations.
*
* @author Damien Carbonne
*
* @param
The parent type. The concrete parent may derive from it.
*/
public abstract class MfAbstractBasicElement
extends MfAbstractChildElement
implements MfNameItem, MfTagOwner, MfStereotypesItem {
protected MfAbstractBasicElement(Builder, ?, ? extends P> builder,
MfElementFeatures features) {
super(builder,
features);
}
@Override
public String getName() {
return super.getName();
}
@Override
public Set getStereotypes() {
return super.getStereotypes();
}
/**
* Base builder of basic elements.
*
* @author Damien Carbonne
*
* @param The builder type.
* @param The built element type.
* @param The concrete parent type.
*/
public abstract static class Builder,
E extends MfAbstractBasicElement super P>,
P extends MfElement>
extends MfAbstractChildElement.Builder {
protected Builder(P parent) {
super(parent);
}
@Override
public final String getName() {
return super.getName();
}
@Override
public B name(String name) {
return super.name(name);
}
@Override
public final Set getStereotypes() {
return super.getStereotypes();
}
@Override
public B stereotype(String stereotype) {
return super.stereotype(stereotype);
}
@Override
public B stereotypes(String... stereotypes) {
return super.stereotypes(stereotypes);
}
@Override
public B stereotypes(Collection stereotypes) {
return super.stereotypes(stereotypes);
}
}
}