Package com.io7m.waxmill.machines

# Class WXMVirtualMachineSet

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

All Implemented Interfaces:
  `WXMVirtualMachineSetType`

    public final class WXMVirtualMachineSet
    extends java.lang.Object
    implements WXMVirtualMachineSetType

A set of virtual machines.

- ## Nested Class Summary

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

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `static WXMVirtualMachineSet.Builder` | `builder()` | Creates a builder for `WXMVirtualMachineSet`.
  `static WXMVirtualMachineSet` | `copyOf​(WXMVirtualMachineSetType instance)` | Creates an immutable copy of a `WXMVirtualMachineSetType` value.
  `boolean` | `equals​(java.lang.Object another)` | This instance is equal to all instances of `WXMVirtualMachineSet` that have equal attribute values.
  `int` | `hashCode()` | Computes a hash code from attributes: `machines`.
  `java.util.SortedMap<java.util.UUID,​WXMVirtualMachine>` | `machines()` |
  `java.lang.String` | `toString()` | Prints the immutable value `WXMVirtualMachineSet` with attribute values.
  `WXMVirtualMachineSet` | `withMachines​(java.util.SortedMap<java.util.UUID,​WXMVirtualMachine> value)` | Copy the current immutable object by setting a value for the `machines` attribute.

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

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

- ## Method Details

  - ### machines

    public java.util.SortedMap<java.util.UUID,​WXMVirtualMachine> machines()
    Specified by:
      `machines` in interface `WXMVirtualMachineSetType`
    Returns:
      The virtual machines, by ID

  - ### withMachines

    public final WXMVirtualMachineSet withMachines​(java.util.SortedMap<java.util.UUID,​WXMVirtualMachine> value)
    Copy the current immutable object by setting a value for the `machines` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for machines
    Returns:
      A modified copy of the `this` object

  - ### equals

    public boolean equals​(java.lang.Object another)
    This instance is equal to all instances of `WXMVirtualMachineSet` 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: `machines`.
    Overrides:
      `hashCode` in class `java.lang.Object`
    Returns:
      hashCode value

  - ### toString

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

  - ### copyOf

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

  - ### builder

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

         WXMVirtualMachineSet.builder()
            .setMachines(SortedMap&lt;UUID, WXMVirtualMachine&gt;) // required machines
            .build();

    Returns:
      A new WXMVirtualMachineSet builder