Package com.io7m.waxmill.machines

# Class WXMTap

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

All Implemented Interfaces:
  `WXMNetworkDeviceBackendType`, `WXMTapType`

    public final class WXMTap
    extends java.lang.Object
    implements WXMTapType

A TAP device.

- ## Nested Class Summary

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

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

  `WXMNetworkDeviceBackendType.Kind`

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `WXMMACAddress` | `address()` |
  `static WXMTap.Builder` | `builder()` | Creates a builder for `WXMTap`.
  `java.lang.String` | `comment()` |
  `static WXMTap` | `copyOf​(WXMTapType instance)` | Creates an immutable copy of a `WXMTapType` value.
  `boolean` | `equals​(java.lang.Object another)` | This instance is equal to all instances of `WXMTap` that have equal attribute values.
  `java.util.List<WXMInterfaceGroupName>` | `groups()` |
  `int` | `hashCode()` | Computes a hash code from attributes: `name`, `address`, `groups`, `comment`.
  `WXMTAPDeviceName` | `name()` |
  `java.lang.String` | `toString()` | Prints the immutable value `WXMTap` with attribute values.
  `WXMTap` | `withAddress​(WXMMACAddress value)` | Copy the current immutable object by setting a value for the `address` attribute.
  `WXMTap` | `withComment​(java.lang.String value)` | Copy the current immutable object by setting a value for the `comment` attribute.
  `WXMTap` | `withGroups​(WXMInterfaceGroupName... elements)` | Copy the current immutable object with elements that replace the content of `groups`.
  `WXMTap` | `withGroups​(java.lang.Iterable<? extends WXMInterfaceGroupName> elements)` | Copy the current immutable object with elements that replace the content of `groups`.
  `WXMTap` | `withName​(WXMTAPDeviceName 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.WXMTapType

  `kind`

- ## Method Details

  - ### name

    public WXMTAPDeviceName name()
    Specified by:
      `name` in interface `WXMTapType`
    Returns:
      The underlying device name

  - ### address

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

  - ### groups

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

  - ### comment

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

  - ### withName

    public final WXMTap withName​(WXMTAPDeviceName 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 WXMTap 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 WXMTap 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 WXMTap 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 WXMTap 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 `WXMTap` 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 `WXMTap` with attribute values.
    Overrides:
      `toString` in class `java.lang.Object`
    Returns:
      A string representation of the value

  - ### copyOf

    public static WXMTap copyOf​(WXMTapType instance)
    Creates an immutable copy of a `WXMTapType` 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 WXMTap instance

  - ### builder

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

         WXMTap.builder()
            .setName(com.io7m.waxmill.machines.WXMTAPDeviceName) // required name
            .setAddress(com.io7m.waxmill.machines.WXMMACAddress) // required address
            .addGroups|addAllGroups(WXMInterfaceGroupName) // groups elements
            .setComment(String) // optional comment
            .build();

    Returns:
      A new WXMTap builder