Class EquivalentNodesSet.Builder

  • Enclosing class:
    EquivalentNodesSet

    @NotThreadSafe
    public static final class EquivalentNodesSet.Builder
    extends Object
    Builds instances of type EquivalentNodesSet. 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 EquivalentNodesSet instances.
         new EquivalentNodesSet.Builder()
            .meta(org.geneontology.obographs.core.model.Meta | null) // nullable meta
            .representativeNodeId(String) // optional representativeNodeId
            .addNodeId|addAllNodeIds(String) // nodeIds elements
            .build();
         
    • Method Detail

      • from

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

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

        @CanIgnoreReturnValue
        public final EquivalentNodesSet.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
      • representativeNodeId

        @CanIgnoreReturnValue
        public final EquivalentNodesSet.Builder representativeNodeId​(String representativeNodeId)
        Initializes the value for the representativeNodeId attribute.

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

        Parameters:
        representativeNodeId - The value for representativeNodeId
        Returns:
        this builder for use in a chained invocation
      • addNodeId

        @CanIgnoreReturnValue
        public final EquivalentNodesSet.Builder addNodeId​(String element)
        Adds one element to nodeIds set.
        Parameters:
        element - A nodeIds element
        Returns:
        this builder for use in a chained invocation
      • addNodeIds

        @CanIgnoreReturnValue
        public final EquivalentNodesSet.Builder addNodeIds​(String... elements)
        Adds elements to nodeIds set.
        Parameters:
        elements - An array of nodeIds elements
        Returns:
        this builder for use in a chained invocation
      • nodeIds

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

        @CanIgnoreReturnValue
        public final EquivalentNodesSet.Builder addAllNodeIds​(Iterable<String> elements)
        Adds elements to nodeIds set.
        Parameters:
        elements - An iterable of nodeIds elements
        Returns:
        this builder for use in a chained invocation