Class EquivalentNodesSet.Builder
- java.lang.Object
-
- org.geneontology.obographs.core.model.axiom.EquivalentNodesSet.Builder
-
- Enclosing class:
- EquivalentNodesSet
@NotThreadSafe public static final class EquivalentNodesSet.Builder extends Object
Builds instances of typeEquivalentNodesSet. 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 forEquivalentNodesSetinstances.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EquivalentNodesSet.BuilderaddAllNodeIds(Iterable<String> elements)Adds elements tonodeIdsset.EquivalentNodesSet.BuilderaddNodeId(String element)Adds one element tonodeIdsset.EquivalentNodesSet.BuilderaddNodeIds(String... elements)Adds elements tonodeIdsset.EquivalentNodesSetbuild()Builds a newEquivalentNodesSet.EquivalentNodesSet.Builderfrom(AbstractEquivalentNodesSet instance)Fill a builder with attribute values from the providedorg.geneontology.obographs.core.model.axiom.AbstractEquivalentNodesSetinstance.EquivalentNodesSet.Builderfrom(Axiom instance)Fill a builder with attribute values from the providedorg.geneontology.obographs.core.model.axiom.Axiominstance.EquivalentNodesSet.Buildermeta(Meta meta)Initializes the value for themetaattribute.EquivalentNodesSet.BuildernodeIds(Iterable<String> elements)Sets or replaces all elements fornodeIdsset.EquivalentNodesSet.BuilderrepresentativeNodeId(String representativeNodeId)Initializes the value for therepresentativeNodeIdattribute.
-
-
-
Constructor Detail
-
Builder
public Builder()
Creates a builder forEquivalentNodesSetinstances.new EquivalentNodesSet.Builder() .meta(org.geneontology.obographs.core.model.Meta | null) // nullablemeta.representativeNodeId(String) // optionalrepresentativeNodeId.addNodeId|addAllNodeIds(String) //nodeIdselements .build();
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final EquivalentNodesSet.Builder from(AbstractEquivalentNodesSet instance)
Fill a builder with attribute values from the providedorg.geneontology.obographs.core.model.axiom.AbstractEquivalentNodesSetinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final EquivalentNodesSet.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 EquivalentNodesSet.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
-
representativeNodeId
@CanIgnoreReturnValue public final EquivalentNodesSet.Builder representativeNodeId(String representativeNodeId)
Initializes the value for therepresentativeNodeIdattribute.If not set, this attribute will have a default value as returned by the initializer of
representativeNodeId.- Parameters:
representativeNodeId- The value for representativeNodeId- Returns:
thisbuilder for use in a chained invocation
-
addNodeId
@CanIgnoreReturnValue public final EquivalentNodesSet.Builder addNodeId(String element)
Adds one element tonodeIdsset.- Parameters:
element- A nodeIds element- Returns:
thisbuilder for use in a chained invocation
-
addNodeIds
@CanIgnoreReturnValue public final EquivalentNodesSet.Builder addNodeIds(String... elements)
Adds elements tonodeIdsset.- Parameters:
elements- An array of nodeIds elements- Returns:
thisbuilder for use in a chained invocation
-
nodeIds
@CanIgnoreReturnValue public final EquivalentNodesSet.Builder nodeIds(Iterable<String> elements)
Sets or replaces all elements fornodeIdsset.- Parameters:
elements- An iterable of nodeIds elements- Returns:
thisbuilder for use in a chained invocation
-
addAllNodeIds
@CanIgnoreReturnValue public final EquivalentNodesSet.Builder addAllNodeIds(Iterable<String> elements)
Adds elements tonodeIdsset.- Parameters:
elements- An iterable of nodeIds elements- Returns:
thisbuilder for use in a chained invocation
-
build
public EquivalentNodesSet build()
Builds a newEquivalentNodesSet.- Returns:
- An immutable instance of EquivalentNodesSet
- Throws:
IllegalStateException- if any required attributes are missing
-
-