Class PropertyChainAxiom.Builder
java.lang.Object
org.geneontology.obographs.core.model.axiom.PropertyChainAxiom.Builder
- Enclosing class:
- PropertyChainAxiom
Builds instances of type
PropertyChainAxiom.
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 TypeMethodDescriptionaddAllChainPredicateIds(Iterable<String> elements) Adds elements tochainPredicateIdslist.addChainPredicateId(String element) Adds one element tochainPredicateIdslist.addChainPredicateIds(String... elements) Adds elements tochainPredicateIdslist.build()Builds a newPropertyChainAxiom.chainPredicateIds(Iterable<String> elements) Sets or replaces all elements forchainPredicateIdslist.from(AbstractPropertyChainAxiom instance) Fill a builder with attribute values from the providedorg.geneontology.obographs.core.model.axiom.AbstractPropertyChainAxiominstance.Fill a builder with attribute values from the providedorg.geneontology.obographs.core.model.axiom.Axiominstance.Initializes the value for themetaattribute.predicateId(String predicateId) Initializes the value for thepredicateIdattribute.
-
Constructor Details
-
Builder
public Builder()Creates a builder forPropertyChainAxiominstances.new PropertyChainAxiom.Builder() .meta(org.geneontology.obographs.core.model.Meta | null) // nullablemeta.predicateId(String) // requiredpredicateId.addChainPredicateId|addAllChainPredicateIds(String) //chainPredicateIdselements .build();
-
-
Method Details
-
from
Fill a builder with attribute values from the providedorg.geneontology.obographs.core.model.axiom.AbstractPropertyChainAxiominstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedorg.geneontology.obographs.core.model.axiom.Axiominstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
meta
Initializes the value for themetaattribute.- Parameters:
meta- The value for meta (can benull)- Returns:
thisbuilder for use in a chained invocation
-
predicateId
Initializes the value for thepredicateIdattribute.- Parameters:
predicateId- The value for predicateId- Returns:
thisbuilder for use in a chained invocation
-
addChainPredicateId
Adds one element tochainPredicateIdslist.- Parameters:
element- A chainPredicateIds element- Returns:
thisbuilder for use in a chained invocation
-
addChainPredicateIds
Adds elements tochainPredicateIdslist.- Parameters:
elements- An array of chainPredicateIds elements- Returns:
thisbuilder for use in a chained invocation
-
chainPredicateIds
Sets or replaces all elements forchainPredicateIdslist.- Parameters:
elements- An iterable of chainPredicateIds elements- Returns:
thisbuilder for use in a chained invocation
-
addAllChainPredicateIds
Adds elements tochainPredicateIdslist.- Parameters:
elements- An iterable of chainPredicateIds elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newPropertyChainAxiom.- Returns:
- An immutable instance of PropertyChainAxiom
- Throws:
IllegalStateException- if any required attributes are missing
-