All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cdc.mf.model.MfEnumerationValue Maven / Gradle / Ivy

The newest version!
package cdc.mf.model;

import cdc.mf.model.MfElementFeatures.Feature;

public final class MfEnumerationValue extends MfAbstractBasicElement
        implements MfDependencyOwner {
    public static final Class PARENT_CLASS =
            MfEnumeration.class;
    public static final Class BUILDER_CLASS =
            Builder.class;
    public static final MfElementFeatures FEATURES =
            MfElementFeatures.builder()
                             .feature(Feature.NAME_UNIQUENESS)
                             .build();

    MfEnumerationValue(Builder builder) {
        super(builder,
              FEATURES);

        addToParent(FEATURES);
        addToModel();
    }

    @Override
    public MfEnumerationValue duplicate(MfEnumeration tgtParent) {
        return tgtParent.value()
                        .set(this)
                        .build();
    }

    @Override
    public MfDocumentation.Builder documentation() {
        return MfDocumentation.builder(this);
    }

    @Override
    public MfTag.Builder tag() {
        return MfTag.builder(this);
    }

    @Override
    public MfDependency.Builder dependency() {
        return MfDependency.builder(this);
    }

    static Builder builder(MfEnumeration parent) {
        return new Builder(parent);
    }

    public static final class Builder
            extends MfAbstractBasicElement.Builder {

        protected Builder(MfEnumeration parent) {
            super(parent);
        }

        @Override
        public Class getElementClass() {
            return MfEnumerationValue.class;
        }

        @Override
        public MfEnumerationValue build() {
            return new MfEnumerationValue(this);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy