Class LogicalDefinitionAxiom.Builder
- java.lang.Object
-
- org.geneontology.obographs.core.model.axiom.LogicalDefinitionAxiom.Builder
-
- Enclosing class:
- LogicalDefinitionAxiom
@NotThreadSafe public static final class LogicalDefinitionAxiom.Builder extends Object
Builds instances of typeLogicalDefinitionAxiom. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Constructor Summary
Constructors Constructor Description Builder()Creates a builder forLogicalDefinitionAxiominstances.
-
Method Summary
-
-
-
Constructor Detail
-
Builder
public Builder()
Creates a builder forLogicalDefinitionAxiominstances.new LogicalDefinitionAxiom.Builder() .meta(org.geneontology.obographs.core.model.Meta | null) // nullablemeta.definedClassId(String) // requireddefinedClassId.addGenusId|addAllGenusIds(String) //genusIdselements .addRestriction|addAllRestrictions(ExistentialRestrictionExpression) //restrictionselements .build();
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final LogicalDefinitionAxiom.Builder from(AbstractLogicalDefinitionAxiom instance)
Fill a builder with attribute values from the providedorg.geneontology.obographs.core.model.axiom.AbstractLogicalDefinitionAxiominstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final LogicalDefinitionAxiom.Builder from(Axiom instance)
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
@CanIgnoreReturnValue public final LogicalDefinitionAxiom.Builder meta(@Nullable Meta meta)
Initializes the value for themetaattribute.- Parameters:
meta- The value for meta (can benull)- Returns:
thisbuilder for use in a chained invocation
-
definedClassId
@CanIgnoreReturnValue public final LogicalDefinitionAxiom.Builder definedClassId(String definedClassId)
Initializes the value for thedefinedClassIdattribute.- Parameters:
definedClassId- The value for definedClassId- Returns:
thisbuilder for use in a chained invocation
-
addGenusId
@CanIgnoreReturnValue public final LogicalDefinitionAxiom.Builder addGenusId(String element)
Adds one element togenusIdslist.- Parameters:
element- A genusIds element- Returns:
thisbuilder for use in a chained invocation
-
addGenusIds
@CanIgnoreReturnValue public final LogicalDefinitionAxiom.Builder addGenusIds(String... elements)
Adds elements togenusIdslist.- Parameters:
elements- An array of genusIds elements- Returns:
thisbuilder for use in a chained invocation
-
genusIds
@CanIgnoreReturnValue public final LogicalDefinitionAxiom.Builder genusIds(Iterable<String> elements)
Sets or replaces all elements forgenusIdslist.- Parameters:
elements- An iterable of genusIds elements- Returns:
thisbuilder for use in a chained invocation
-
addAllGenusIds
@CanIgnoreReturnValue public final LogicalDefinitionAxiom.Builder addAllGenusIds(Iterable<String> elements)
Adds elements togenusIdslist.- Parameters:
elements- An iterable of genusIds elements- Returns:
thisbuilder for use in a chained invocation
-
addRestriction
@CanIgnoreReturnValue public final LogicalDefinitionAxiom.Builder addRestriction(ExistentialRestrictionExpression element)
Adds one element torestrictionslist.- Parameters:
element- A restrictions element- Returns:
thisbuilder for use in a chained invocation
-
addRestrictions
@CanIgnoreReturnValue public final LogicalDefinitionAxiom.Builder addRestrictions(ExistentialRestrictionExpression... elements)
Adds elements torestrictionslist.- Parameters:
elements- An array of restrictions elements- Returns:
thisbuilder for use in a chained invocation
-
restrictions
@CanIgnoreReturnValue public final LogicalDefinitionAxiom.Builder restrictions(Iterable<? extends ExistentialRestrictionExpression> elements)
Sets or replaces all elements forrestrictionslist.- Parameters:
elements- An iterable of restrictions elements- Returns:
thisbuilder for use in a chained invocation
-
addAllRestrictions
@CanIgnoreReturnValue public final LogicalDefinitionAxiom.Builder addAllRestrictions(Iterable<? extends ExistentialRestrictionExpression> elements)
Adds elements torestrictionslist.- Parameters:
elements- An iterable of restrictions elements- Returns:
thisbuilder for use in a chained invocation
-
build
public LogicalDefinitionAxiom build()
Builds a newLogicalDefinitionAxiom.- Returns:
- An immutable instance of LogicalDefinitionAxiom
- Throws:
IllegalStateException- if any required attributes are missing
-
-