Class SynonymPropertyValue.Builder
java.lang.Object
org.geneontology.obographs.core.model.meta.SynonymPropertyValue.Builder
- Enclosing class:
- SynonymPropertyValue
Builds instances of type
SynonymPropertyValue.
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 TypeMethodDescriptionaddAllXrefs(Iterable<String> elements) Adds elements toxrefslist.Adds one element toxrefslist.Adds elements toxrefslist.build()Builds a newSynonymPropertyValue.from(AbstractSynonymPropertyValue instance) Fill a builder with attribute values from the providedorg.geneontology.obographs.core.model.meta.AbstractSynonymPropertyValueinstance.from(PropertyValue instance) Fill a builder with attribute values from the providedorg.geneontology.obographs.core.model.meta.PropertyValueinstance.Initializes the value for themetaattribute.Initializes the value for thepredattribute.synonymType(String synonymType) Initializes the value for thesynonymTypeattribute.Initializes the value for thevalattribute.Sets or replaces all elements forxrefslist.
-
Constructor Details
-
Builder
public Builder()Creates a builder forSynonymPropertyValueinstances.new SynonymPropertyValue.Builder() .pred(String) // optionalpred.val(String) // optionalval.addXref|addAllXrefs(String) //xrefselements .meta(org.geneontology.obographs.core.model.Meta | null) // nullablemeta.synonymType(String) // optionalsynonymType.build();
-
-
Method Details
-
from
Fill a builder with attribute values from the providedorg.geneontology.obographs.core.model.meta.AbstractSynonymPropertyValueinstance.- 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.meta.PropertyValueinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
pred
Initializes the value for thepredattribute.If not set, this attribute will have a default value as returned by the initializer of
pred.- Parameters:
pred- The value for pred- Returns:
thisbuilder for use in a chained invocation
-
val
Initializes the value for thevalattribute.If not set, this attribute will have a default value as returned by the initializer of
val.- Parameters:
val- The value for val- Returns:
thisbuilder for use in a chained invocation
-
addXref
Adds one element toxrefslist.- Parameters:
element- A xrefs element- Returns:
thisbuilder for use in a chained invocation
-
addXrefs
Adds elements toxrefslist.- Parameters:
elements- An array of xrefs elements- Returns:
thisbuilder for use in a chained invocation
-
xrefs
Sets or replaces all elements forxrefslist.- Parameters:
elements- An iterable of xrefs elements- Returns:
thisbuilder for use in a chained invocation
-
addAllXrefs
Adds elements toxrefslist.- Parameters:
elements- An iterable of xrefs elements- 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
-
synonymType
Initializes the value for thesynonymTypeattribute.If not set, this attribute will have a default value as returned by the initializer of
synonymType.- Parameters:
synonymType- The value for synonymType- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newSynonymPropertyValue.- Returns:
- An immutable instance of SynonymPropertyValue
- Throws:
IllegalStateException- if any required attributes are missing
-