Class DefinitionPropertyValue.Builder

  • Enclosing class:
    DefinitionPropertyValue

    @NotThreadSafe
    public static final class DefinitionPropertyValue.Builder
    extends Object
    Builds instances of type DefinitionPropertyValue. 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 Detail

      • Builder

        public Builder()
        Creates a builder for DefinitionPropertyValue instances.
         new DefinitionPropertyValue.Builder()
            .pred(String) // optional pred
            .val(String) // optional val
            .addXref|addAllXrefs(String) // xrefs elements
            .meta(org.geneontology.obographs.core.model.Meta | null) // nullable meta
            .build();
         
    • Method Detail

      • from

        @CanIgnoreReturnValue
        public final DefinitionPropertyValue.Builder from​(PropertyValue instance)
        Fill a builder with attribute values from the provided org.geneontology.obographs.core.model.meta.PropertyValue instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        @CanIgnoreReturnValue
        public final DefinitionPropertyValue.Builder from​(AbstractDefinitionPropertyValue instance)
        Fill a builder with attribute values from the provided org.geneontology.obographs.core.model.meta.AbstractDefinitionPropertyValue instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • pred

        @CanIgnoreReturnValue
        public final DefinitionPropertyValue.Builder pred​(String pred)
        Initializes the value for the pred attribute.

        If not set, this attribute will have a default value as returned by the initializer of pred.

        Parameters:
        pred - The value for pred
        Returns:
        this builder for use in a chained invocation
      • val

        @CanIgnoreReturnValue
        public final DefinitionPropertyValue.Builder val​(String val)
        Initializes the value for the val attribute.

        If not set, this attribute will have a default value as returned by the initializer of val.

        Parameters:
        val - The value for val
        Returns:
        this builder for use in a chained invocation
      • addXref

        @CanIgnoreReturnValue
        public final DefinitionPropertyValue.Builder addXref​(String element)
        Adds one element to xrefs list.
        Parameters:
        element - A xrefs element
        Returns:
        this builder for use in a chained invocation
      • addXrefs

        @CanIgnoreReturnValue
        public final DefinitionPropertyValue.Builder addXrefs​(String... elements)
        Adds elements to xrefs list.
        Parameters:
        elements - An array of xrefs elements
        Returns:
        this builder for use in a chained invocation
      • xrefs

        @CanIgnoreReturnValue
        public final DefinitionPropertyValue.Builder xrefs​(Iterable<String> elements)
        Sets or replaces all elements for xrefs list.
        Parameters:
        elements - An iterable of xrefs elements
        Returns:
        this builder for use in a chained invocation
      • addAllXrefs

        @CanIgnoreReturnValue
        public final DefinitionPropertyValue.Builder addAllXrefs​(Iterable<String> elements)
        Adds elements to xrefs list.
        Parameters:
        elements - An iterable of xrefs elements
        Returns:
        this builder for use in a chained invocation
      • meta

        @CanIgnoreReturnValue
        public final DefinitionPropertyValue.Builder meta​(@Nullable
                                                          Meta meta)
        Initializes the value for the meta attribute.
        Parameters:
        meta - The value for meta (can be null)
        Returns:
        this builder for use in a chained invocation