Class FormatDescription.Builder

  • Enclosing class:
    FormatDescription

    public static final class FormatDescription.Builder
    extends java.lang.Object
    Builds instances of type FormatDescription. 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.

    • Method Detail

      • from

        public final FormatDescription.Builder from​(FormatDescriptionType instance)
        Fill a builder with attribute values from the provided FormatDescriptionType instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • setDescription

        public final FormatDescription.Builder setDescription​(java.lang.String description)
        Initializes the value for the description attribute.
        Parameters:
        description - The value for description
        Returns:
        this builder for use in a chained invocation
      • setMimeType

        public final FormatDescription.Builder setMimeType​(java.lang.String mimeType)
        Initializes the value for the mimeType attribute.
        Parameters:
        mimeType - The value for mimeType
        Returns:
        this builder for use in a chained invocation
      • setName

        public final FormatDescription.Builder setName​(java.net.URI name)
        Initializes the value for the name attribute.
        Parameters:
        name - The value for name
        Returns:
        this builder for use in a chained invocation
      • build

        public FormatDescription build()
        Builds a new FormatDescription.
        Returns:
        An immutable instance of FormatDescription
        Throws:
        java.lang.IllegalStateException - if any required attributes are missing