Class ImmutablePorts.Builder

  • Enclosing class:
    ImmutablePorts

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

        @CanIgnoreReturnValue
        public final ImmutablePorts.Builder dns​(int dns)
        Initializes the value for the dns attribute.
        Parameters:
        dns - The value for dns
        Returns:
        this builder for use in a chained invocation
      • http

        @CanIgnoreReturnValue
        public final ImmutablePorts.Builder http​(int http)
        Initializes the value for the http attribute.
        Parameters:
        http - The value for http
        Returns:
        this builder for use in a chained invocation
      • rpc

        @CanIgnoreReturnValue
        public final ImmutablePorts.Builder rpc​(int rpc)
        Initializes the value for the rpc attribute.
        Parameters:
        rpc - The value for rpc
        Returns:
        this builder for use in a chained invocation
      • serfLan

        @CanIgnoreReturnValue
        public final ImmutablePorts.Builder serfLan​(int serfLan)
        Initializes the value for the serfLan attribute.
        Parameters:
        serfLan - The value for serfLan
        Returns:
        this builder for use in a chained invocation
      • serfWan

        @CanIgnoreReturnValue
        public final ImmutablePorts.Builder serfWan​(int serfWan)
        Initializes the value for the serfWan attribute.
        Parameters:
        serfWan - The value for serfWan
        Returns:
        this builder for use in a chained invocation
      • server

        @CanIgnoreReturnValue
        public final ImmutablePorts.Builder server​(int server)
        Initializes the value for the server attribute.
        Parameters:
        server - The value for server
        Returns:
        this builder for use in a chained invocation
      • build

        public ImmutablePorts build()
        Builds a new ImmutablePorts.
        Returns:
        An immutable instance of Ports
        Throws:
        java.lang.IllegalStateException - if any required attributes are missing