Package com.io7m.waxmill.machines

# Class WXMVMNet

java.lang.Object
com.io7m.waxmill.machines.WXMVMNet

All Implemented Interfaces:
  `WXMDeviceType.WXMNetworkDeviceBackendType`, `WXMDeviceType.WXMVMNetType`

    public final class WXMVMNet
    extends java.lang.Object
    implements WXMDeviceType.WXMVMNetType

A vmnet device.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type | Class | Description
  --- | --- | ---
  `static class` | `WXMVMNet.Builder` | Builds instances of type `WXMVMNet`.

  ## Nested classes/interfaces inherited from interface com.io7m.waxmill.machines.WXMDeviceType.WXMNetworkDeviceBackendType

  `WXMDeviceType.WXMNetworkDeviceBackendType.Kind`

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `WXMMACAddress` | `address()` |
  `static WXMVMNet.Builder` | `builder()` | Creates a builder for `WXMVMNet`.
  `java.lang.String` | `comment()` |
  `static WXMVMNet` | `copyOf​(WXMDeviceType.WXMVMNetType instance)` | Creates an immutable copy of a `WXMDeviceType.WXMVMNetType` value.
  `boolean` | `equals​(java.lang.Object another)` | This instance is equal to all instances of `WXMVMNet` that have equal attribute values.
  `int` | `hashCode()` | Computes a hash code from attributes: `name`, `address`, `comment`.
  `WXMVMNetDeviceName` | `name()` |
  `java.lang.String` | `toString()` | Prints the immutable value `WXMVMNet` with attribute values.
  `WXMVMNet` | `withAddress​(WXMMACAddress value)` | Copy the current immutable object by setting a value for the `address` attribute.
  `WXMVMNet` | `withComment​(java.lang.String value)` | Copy the current immutable object by setting a value for the `comment` attribute.
  `WXMVMNet` | `withName​(WXMVMNetDeviceName value)` | Copy the current immutable object by setting a value for the `name` attribute.

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface com.io7m.waxmill.machines.WXMDeviceType.WXMVMNetType

  `kind`

- ## Method Details

  - ### name

    public WXMVMNetDeviceName name()
    Specified by:
      `name` in interface `WXMDeviceType.WXMVMNetType`
    Returns:
      The underlying device name

  - ### address

    public WXMMACAddress address()
    Specified by:
      `address` in interface `WXMDeviceType.WXMVMNetType`
    Returns:
      The underlying device MAC address

  - ### comment

    public java.lang.String comment()
    Specified by:
      `comment` in interface `WXMDeviceType.WXMNetworkDeviceBackendType`
    Specified by:
      `comment` in interface `WXMDeviceType.WXMVMNetType`
    Returns:
      The value of the `comment` attribute

  - ### withName

    public final WXMVMNet withName​(WXMVMNetDeviceName value)
    Copy the current immutable object by setting a value for the `name` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for name
    Returns:
      A modified copy of the `this` object

  - ### withAddress

    public final WXMVMNet withAddress​(WXMMACAddress value)
    Copy the current immutable object by setting a value for the `address` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for address
    Returns:
      A modified copy of the `this` object

  - ### withComment

    public final WXMVMNet withComment​(java.lang.String value)
    Copy the current immutable object by setting a value for the `comment` attribute. An equals check used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for comment
    Returns:
      A modified copy of the `this` object

  - ### equals

    public boolean equals​(java.lang.Object another)
    This instance is equal to all instances of `WXMVMNet` that have equal attribute values.
    Overrides:
      `equals` in class `java.lang.Object`
    Returns:
      `true` if `this` is equal to `another` instance

  - ### hashCode

    public int hashCode()
    Computes a hash code from attributes: `name`, `address`, `comment`.
    Overrides:
      `hashCode` in class `java.lang.Object`
    Returns:
      hashCode value

  - ### toString

    public java.lang.String toString()
    Prints the immutable value `WXMVMNet` with attribute values.
    Overrides:
      `toString` in class `java.lang.Object`
    Returns:
      A string representation of the value

  - ### copyOf

    public static WXMVMNet copyOf​(WXMDeviceType.WXMVMNetType instance)
    Creates an immutable copy of a `WXMDeviceType.WXMVMNetType` value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
    Parameters:
      `instance` - The instance to copy
    Returns:
      A copied immutable WXMVMNet instance

  - ### builder

    public static WXMVMNet.Builder builder()
    Creates a builder for `WXMVMNet`.

         WXMVMNet.builder()
            .setName(com.io7m.waxmill.machines.WXMVMNetDeviceName) // required name
            .setAddress(com.io7m.waxmill.machines.WXMMACAddress) // required address
            .setComment(String) // optional comment
            .build();

    Returns:
      A new WXMVMNet builder