Class ImmutableFile.Builder

  • Enclosing class:
    ImmutableFile

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

        @CanIgnoreReturnValue
        public final ImmutableFile.Builder from​(File instance)
        Fill a builder with attribute values from the provided File 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
      • filename

        @CanIgnoreReturnValue
        public final ImmutableFile.Builder filename​(@Nullable
                                                    String filename)
        Initializes the value for the filename attribute.
        Parameters:
        filename - The value for filename (can be null)
        Returns:
        this builder for use in a chained invocation
      • additions

        @CanIgnoreReturnValue
        public final ImmutableFile.Builder additions​(@Nullable
                                                     Integer additions)
        Initializes the value for the additions attribute.
        Parameters:
        additions - The value for additions (can be null)
        Returns:
        this builder for use in a chained invocation
      • deletions

        @CanIgnoreReturnValue
        public final ImmutableFile.Builder deletions​(@Nullable
                                                     Integer deletions)
        Initializes the value for the deletions attribute.
        Parameters:
        deletions - The value for deletions (can be null)
        Returns:
        this builder for use in a chained invocation
      • changes

        @CanIgnoreReturnValue
        public final ImmutableFile.Builder changes​(@Nullable
                                                   Integer changes)
        Initializes the value for the changes attribute.
        Parameters:
        changes - The value for changes (can be null)
        Returns:
        this builder for use in a chained invocation
      • status

        @CanIgnoreReturnValue
        public final ImmutableFile.Builder status​(@Nullable
                                                  String status)
        Initializes the value for the status attribute.
        Parameters:
        status - The value for status (can be null)
        Returns:
        this builder for use in a chained invocation
      • rawUrl

        @CanIgnoreReturnValue
        public final ImmutableFile.Builder rawUrl​(URI rawUrl)
        Initializes the optional value rawUrl to rawUrl.
        Parameters:
        rawUrl - The value for rawUrl
        Returns:
        this builder for chained invocation
      • rawUrl

        @CanIgnoreReturnValue
        public final ImmutableFile.Builder rawUrl​(Optional<? extends URI> rawUrl)
        Initializes the optional value rawUrl to rawUrl.
        Parameters:
        rawUrl - The value for rawUrl
        Returns:
        this builder for use in a chained invocation
      • blobUrl

        @CanIgnoreReturnValue
        public final ImmutableFile.Builder blobUrl​(URI blobUrl)
        Initializes the optional value blobUrl to blobUrl.
        Parameters:
        blobUrl - The value for blobUrl
        Returns:
        this builder for chained invocation
      • blobUrl

        @CanIgnoreReturnValue
        public final ImmutableFile.Builder blobUrl​(Optional<? extends URI> blobUrl)
        Initializes the optional value blobUrl to blobUrl.
        Parameters:
        blobUrl - The value for blobUrl
        Returns:
        this builder for use in a chained invocation
      • patch

        @CanIgnoreReturnValue
        public final ImmutableFile.Builder patch​(String patch)
        Initializes the optional value patch to patch.
        Parameters:
        patch - The value for patch
        Returns:
        this builder for chained invocation
      • patch

        @CanIgnoreReturnValue
        public final ImmutableFile.Builder patch​(Optional<String> patch)
        Initializes the optional value patch to patch.
        Parameters:
        patch - The value for patch
        Returns:
        this builder for use in a chained invocation
      • sha

        @CanIgnoreReturnValue
        public final ImmutableFile.Builder sha​(String sha)
        Initializes the optional value sha to sha.
        Parameters:
        sha - The value for sha
        Returns:
        this builder for chained invocation
      • sha

        @CanIgnoreReturnValue
        public final ImmutableFile.Builder sha​(Optional<String> sha)
        Initializes the optional value sha to sha.
        Parameters:
        sha - The value for sha
        Returns:
        this builder for use in a chained invocation
      • contentsUrl

        @CanIgnoreReturnValue
        public final ImmutableFile.Builder contentsUrl​(URI contentsUrl)
        Initializes the optional value contentsUrl to contentsUrl.
        Parameters:
        contentsUrl - The value for contentsUrl
        Returns:
        this builder for chained invocation
      • contentsUrl

        @CanIgnoreReturnValue
        public final ImmutableFile.Builder contentsUrl​(Optional<? extends URI> contentsUrl)
        Initializes the optional value contentsUrl to contentsUrl.
        Parameters:
        contentsUrl - The value for contentsUrl
        Returns:
        this builder for use in a chained invocation