Class ImmutableOutputLogEntry.Builder

  • Enclosing class:
    ImmutableOutputLogEntry

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

    • Constructor Detail

      • Builder

        public Builder()
        Creates a builder for ImmutableOutputLogEntry instances.
         new ImmutableOutputLogEntry.Builder()
            .message(String) // required message
            .timestamp(long) // required timestamp
            .repeated(int) // required repeated
            .build();
         
    • Method Detail

      • from

        public final ImmutableOutputLogEntry.Builder from​(OutputLogEntry instance)
        Fill a builder with attribute values from the provided OutputLogEntry 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
      • message

        public final ImmutableOutputLogEntry.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
      • timestamp

        public final ImmutableOutputLogEntry.Builder timestamp​(long timestamp)
        Initializes the value for the timestamp attribute.
        Parameters:
        timestamp - The value for timestamp
        Returns:
        this builder for use in a chained invocation
      • repeated

        public final ImmutableOutputLogEntry.Builder repeated​(int repeated)
        Initializes the value for the repeated attribute.
        Parameters:
        repeated - The value for repeated
        Returns:
        this builder for use in a chained invocation