Class ImmutableCommitMeta.Builder

  • Enclosing class:
    ImmutableCommitMeta

    @NotThreadSafe
    public static final class ImmutableCommitMeta.Builder
    extends Object
    Builds instances of type ImmutableCommitMeta. 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 ImmutableCommitMeta.Builder from​(CommitMeta instance)
        Fill a builder with attribute values from the provided CommitMeta 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
      • hash

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

        @CanIgnoreReturnValue
        public final ImmutableCommitMeta.Builder committer​(@Nullable
                                                           String 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
      • author

        @CanIgnoreReturnValue
        public final ImmutableCommitMeta.Builder author​(@Nullable
                                                        String 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
      • signedOffBy

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

        @CanIgnoreReturnValue
        public final ImmutableCommitMeta.Builder message​(String message)
        Initializes the value for the message attribute.
        Parameters:
        message - The value for message
        Returns:
        this builder for use in a chained invocation
      • commitTime

        @CanIgnoreReturnValue
        public final ImmutableCommitMeta.Builder commitTime​(@Nullable
                                                            Instant commitTime)
        Initializes the value for the commitTime attribute.
        Parameters:
        commitTime - The value for commitTime (can be null)
        Returns:
        this builder for use in a chained invocation
      • authorTime

        @CanIgnoreReturnValue
        public final ImmutableCommitMeta.Builder authorTime​(@Nullable
                                                            Instant authorTime)
        Initializes the value for the authorTime attribute.
        Parameters:
        authorTime - The value for authorTime (can be null)
        Returns:
        this builder for use in a chained invocation
      • putProperties

        @CanIgnoreReturnValue
        public final ImmutableCommitMeta.Builder putProperties​(String key,
                                                               String value)
        Put one entry to the properties map.
        Parameters:
        key - The key in the properties map
        value - The associated value in the properties map
        Returns:
        this builder for use in a chained invocation
      • putProperties

        @CanIgnoreReturnValue
        public final ImmutableCommitMeta.Builder putProperties​(Map.Entry<String,​? extends String> entry)
        Put one entry to the properties map. Nulls are not permitted
        Parameters:
        entry - The key and value entry
        Returns:
        this builder for use in a chained invocation
      • properties

        @CanIgnoreReturnValue
        public final ImmutableCommitMeta.Builder properties​(Map<String,​? extends String> entries)
        Sets or replaces all mappings from the specified map as entries for the properties map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the properties map
        Returns:
        this builder for use in a chained invocation
      • putAllProperties

        @CanIgnoreReturnValue
        public final ImmutableCommitMeta.Builder putAllProperties​(Map<String,​? extends String> entries)
        Put all mappings from the specified map as entries to properties map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the properties map
        Returns:
        this builder for use in a chained invocation