Class ImmutablePushCommit.Builder

  • Enclosing class:
    ImmutablePushCommit

    @NotThreadSafe
    public static final class ImmutablePushCommit.Builder
    extends Object
    Builds instances of type ImmutablePushCommit. 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 ImmutablePushCommit.Builder from​(PushCommit instance)
        Fill a builder with attribute values from the provided PushCommit instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • id

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

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

        @CanIgnoreReturnValue
        public final ImmutablePushCommit.Builder distinct​(@Nullable
                                                          Boolean distinct)
        Initializes the value for the distinct attribute.
        Parameters:
        distinct - The value for distinct (can be null)
        Returns:
        this builder for use in a chained invocation
      • message

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

        @CanIgnoreReturnValue
        public final ImmutablePushCommit.Builder timestamp​(@Nullable
                                                           ZonedDateTime timestamp)
        Initializes the value for the timestamp attribute.
        Parameters:
        timestamp - The value for timestamp (can be null)
        Returns:
        this builder for use in a chained invocation
      • url

        @CanIgnoreReturnValue
        public final ImmutablePushCommit.Builder url​(@Nullable
                                                     URI url)
        Initializes the value for the url attribute.
        Parameters:
        url - The value for url (can be null)
        Returns:
        this builder for use in a chained invocation
      • author

        @CanIgnoreReturnValue
        public final ImmutablePushCommit.Builder author​(@Nullable
                                                        Author author)
        Initializes the value for the author attribute.
        Parameters:
        author - The value for author (can be null)
        Returns:
        this builder for use in a chained invocation
      • committer

        @CanIgnoreReturnValue
        public final ImmutablePushCommit.Builder committer​(@Nullable
                                                           Author committer)
        Initializes the value for the committer attribute.
        Parameters:
        committer - The value for committer (can be null)
        Returns:
        this builder for use in a chained invocation
      • addAdded

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

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

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

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

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

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

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

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

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

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

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

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