Class WXMVMNet.Builder

java.lang.Object
com.io7m.waxmill.machines.WXMVMNet.Builder
Enclosing class:
WXMVMNet

public static final class WXMVMNet.Builder
extends java.lang.Object
Builds instances of type WXMVMNet. 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 Details

    • from

      public final WXMVMNet.Builder from​(WXMDeviceType.WXMVMNetType instance)
      Fill a builder with attribute values from the provided com.io7m.waxmill.machines.WXMDeviceType.WXMVMNetType instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      Fill a builder with attribute values from the provided com.io7m.waxmill.machines.WXMDeviceType.WXMNetworkDeviceBackendType instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setName

      public final WXMVMNet.Builder setName​(WXMVMNetDeviceName name)
      Initializes the value for the name attribute.
      Parameters:
      name - The value for name
      Returns:
      this builder for use in a chained invocation
    • setAddress

      public final WXMVMNet.Builder setAddress​(WXMMACAddress address)
      Initializes the value for the address attribute.
      Parameters:
      address - The value for address
      Returns:
      this builder for use in a chained invocation
    • setComment

      public final WXMVMNet.Builder setComment​(java.lang.String comment)
      Initializes the value for the comment attribute.

      If not set, this attribute will have a default value as returned by the initializer of comment.

      Parameters:
      comment - The value for comment
      Returns:
      this builder for use in a chained invocation
    • build

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