Class ImmutableStatItem.Builder

  • Enclosing class:
    ImmutableStatItem

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

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

        @CanIgnoreReturnValue
        public final ImmutableStatItem.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 ImmutableStatItem.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