Package com.io7m.waxmill.machines

# Class WXMVMNet

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

All Implemented Interfaces:
  `WXMNetworkDeviceBackendType`, `WXMVMNetType`

    public final class WXMVMNet
    extends java.lang.Object
    implements 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.WXMNetworkDeviceBackendType

  `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​(WXMVMNetType instance)` | Creates an immutable copy of a `WXMVMNetType` value.
  `boolean` | `equals​(java.lang.Object another)` | This instance is equal to all instances of `WXMVMNet` that have equal attribute values.
  `java.util.List<WXMInterfaceGroupName>` | `groups()` |
  `int` | `hashCode()` | Computes a hash code from attributes: `name`, `address`, `groups`, `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` | `withGroups​(WXMInterfaceGroupName... elements)` | Copy the current immutable object with elements that replace the content of `groups`.
  `WXMVMNet` | `withGroups​(java.lang.Iterable<? extends WXMInterfaceGroupName> elements)` | Copy the current immutable object with elements that replace the content of `groups`.
  `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.WXMVMNetType

  `kind`

- ## Method Details

  - ### name

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

  - ### address

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

  - ### groups

    public java.util.List<WXMInterfaceGroupName> groups()
    Specified by:
      `groups` in interface `WXMNetworkDeviceBackendType`
    Specified by:
      `groups` in interface `WXMVMNetType`
    Returns:
      The value of the `groups` attribute

  - ### comment

    public java.lang.String comment()
    Specified by:
      `comment` in interface `WXMNetworkDeviceBackendType`
    Specified by:
      `comment` in interface `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

  - ### withGroups

    public final WXMVMNet withGroups​(WXMInterfaceGroupName... elements)
    Copy the current immutable object with elements that replace the content of `groups`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withGroups

    public final WXMVMNet withGroups​(java.lang.Iterable<? extends WXMInterfaceGroupName> elements)
    Copy the current immutable object with elements that replace the content of `groups`. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `elements` - An iterable of groups elements to set
    Returns:
      A modified copy of `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`, `groups`, `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​(WXMVMNetType instance)
    Creates an immutable copy of a `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
            .addGroups|addAllGroups(WXMInterfaceGroupName) // groups elements
            .setComment(String) // optional comment
            .build();

    Returns:
      A new WXMVMNet builder