cdc.applic.dictionaries.edit.EnUserDefinedAssertion Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cdc-applic-dictionaries-edit Show documentation
Show all versions of cdc-applic-dictionaries-edit Show documentation
Applicabilities Dictionaries Edition.
package cdc.applic.dictionaries.edit;
import cdc.applic.expressions.Expression;
import cdc.util.lang.Checks;
public final class EnUserDefinedAssertion extends EnAbstractOwnedElement>
implements EnExpressionItem {
public static final String KIND = "UserDefinedAssertion";
private Expression expression;
protected EnUserDefinedAssertion(Builder builder) {
super(builder);
this.expression = builder.expression;
addToOwner();
}
@Override
public String getKind() {
return KIND;
}
@Override
public EnRef getRef() {
return getRef(EnUserDefinedAssertion.class);
}
@Override
public Expression getExpression() {
return expression;
}
@Override
public void setExpression(Expression expression) {
this.expression = Checks.isNotNull(expression, EnNames.EXPRESSION);
fireSemanticChange(EnNames.EXPRESSION);
}
static Builder builder(EnDictionary> owner) {
return new Builder(owner);
}
public static final class Builder
extends EnAbstractOwnedElement.Builder>
implements EnExpressionBuilding {
private Expression expression = Expression.TRUE;
protected Builder(EnDictionary> owner) {
super(owner);
}
@Override
public Class getBuiltClass() {
return EnUserDefinedAssertion.class;
}
@Override
public Builder expression(Expression expression) {
Checks.isNotNull(expression, EnNames.EXPRESSION);
this.expression = expression;
return self();
}
@Override
public EnUserDefinedAssertion build() {
return wrap(new EnUserDefinedAssertion(this));
}
}
}