Class ExistentialRestrictionExpression.Builder
java.lang.Object
org.geneontology.obographs.core.model.axiom.ExistentialRestrictionExpression.Builder
- Enclosing class:
- ExistentialRestrictionExpression
Builds instances of type
ExistentialRestrictionExpression.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newExistentialRestrictionExpression.Initializes the value for thefillerIdattribute.from(AbstractExistentialRestrictionExpression instance) Fill a builder with attribute values from the providedAbstractExistentialRestrictionExpressioninstance.propertyId(String propertyId) Initializes the value for thepropertyIdattribute.
-
Constructor Details
-
Builder
public Builder()Creates a builder forExistentialRestrictionExpressioninstances.new ExistentialRestrictionExpression.Builder() .propertyId(String) // requiredpropertyId.fillerId(String) // requiredfillerId.build();
-
-
Method Details
-
from
public final ExistentialRestrictionExpression.Builder from(AbstractExistentialRestrictionExpression instance) Fill a builder with attribute values from the providedAbstractExistentialRestrictionExpressioninstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
propertyId
Initializes the value for thepropertyIdattribute.- Parameters:
propertyId- The value for propertyId- Returns:
thisbuilder for use in a chained invocation
-
fillerId
Initializes the value for thefillerIdattribute.- Parameters:
fillerId- The value for fillerId- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newExistentialRestrictionExpression.- Returns:
- An immutable instance of ExistentialRestrictionExpression
- Throws:
IllegalStateException- if any required attributes are missing
-