Class ImmutableLogEntry.Builder

  • Enclosing class:
    ImmutableLogEntry

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

        @CanIgnoreReturnValue
        public final ImmutableLogEntry.Builder commitMeta​(CommitMeta commitMeta)
        Initializes the value for the commitMeta attribute.
        Parameters:
        commitMeta - The value for commitMeta
        Returns:
        this builder for use in a chained invocation
      • parentCommitHash

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

        @CanIgnoreReturnValue
        public final ImmutableLogEntry.Builder addOperations​(Operation element)
        Adds one element to operations list.
        Parameters:
        element - A operations element
        Returns:
        this builder for use in a chained invocation
      • addOperations

        @CanIgnoreReturnValue
        public final ImmutableLogEntry.Builder addOperations​(Operation... elements)
        Adds elements to operations list.
        Parameters:
        elements - An array of operations elements
        Returns:
        this builder for use in a chained invocation
      • addAllOperations

        @CanIgnoreReturnValue
        public final ImmutableLogEntry.Builder addAllOperations​(Iterable<? extends Operation> elements)
        Adds elements to operations list.
        Parameters:
        elements - An iterable of operations elements
        Returns:
        this builder for use in a chained invocation