Class XrefPropertyValue.Builder

  • Enclosing class:
    XrefPropertyValue

    @NotThreadSafe
    public static final class XrefPropertyValue.Builder
    extends Object
    Builds instances of type XrefPropertyValue. 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 XrefPropertyValue instances.
         new XrefPropertyValue.Builder()
            .pred(String) // optional pred
            .val(String) // optional val
            .addXref|addAllXrefs(String) // xrefs elements
            .meta(org.geneontology.obographs.core.model.Meta | null) // nullable meta
            .lbl(String) // optional lbl
            .build();
         
    • Method Detail

      • from

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

        @CanIgnoreReturnValue
        public final XrefPropertyValue.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
      • pred

        @CanIgnoreReturnValue
        public final XrefPropertyValue.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 XrefPropertyValue.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 XrefPropertyValue.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 XrefPropertyValue.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 XrefPropertyValue.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 XrefPropertyValue.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 XrefPropertyValue.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
      • lbl

        @CanIgnoreReturnValue
        public final XrefPropertyValue.Builder lbl​(String lbl)
        Initializes the value for the lbl attribute.

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

        Parameters:
        lbl - The value for lbl
        Returns:
        this builder for use in a chained invocation