Package com.io7m.waxmill.machines

# Class WXMSectorSizes

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

All Implemented Interfaces:
  `WXMDeviceType.WXMSectorSizesType`

    public final class WXMSectorSizes
    extends java.lang.Object
    implements WXMDeviceType.WXMSectorSizesType

Immutable implementation of `WXMDeviceType.WXMSectorSizesType`.

Use the builder to create immutable instances: `WXMSectorSizes.builder()`.

- ## Nested Class Summary

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

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `static WXMSectorSizes.Builder` | `builder()` | Creates a builder for `WXMSectorSizes`.
  `static WXMSectorSizes` | `copyOf​(WXMDeviceType.WXMSectorSizesType instance)` | Creates an immutable copy of a `WXMDeviceType.WXMSectorSizesType` value.
  `boolean` | `equals​(java.lang.Object another)` | This instance is equal to all instances of `WXMSectorSizes` that have equal attribute values.
  `int` | `hashCode()` | Computes a hash code from attributes: `logical`, `physical`.
  `java.math.BigInteger` | `logical()` |
  `java.math.BigInteger` | `physical()` |
  `java.lang.String` | `toString()` | Prints the immutable value `WXMSectorSizes` with attribute values.
  `WXMSectorSizes` | `withLogical​(java.math.BigInteger value)` | Copy the current immutable object by setting a value for the `logical` attribute.
  `WXMSectorSizes` | `withPhysical​(java.math.BigInteger value)` | Copy the current immutable object by setting a value for the `physical` attribute.

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

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

- ## Method Details

  - ### logical

    public java.math.BigInteger logical()
    Specified by:
      `logical` in interface `WXMDeviceType.WXMSectorSizesType`
    Returns:
      The value of the `logical` attribute

  - ### physical

    public java.math.BigInteger physical()
    Specified by:
      `physical` in interface `WXMDeviceType.WXMSectorSizesType`
    Returns:
      The value of the `physical` attribute

  - ### withLogical

    public final WXMSectorSizes withLogical​(java.math.BigInteger value)
    Copy the current immutable object by setting a value for the `logical` attribute. An equals check used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for logical
    Returns:
      A modified copy of the `this` object

  - ### withPhysical

    public final WXMSectorSizes withPhysical​(java.math.BigInteger value)
    Copy the current immutable object by setting a value for the `physical` attribute. An equals check used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for physical
    Returns:
      A modified copy of the `this` object

  - ### equals

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

  - ### toString

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

  - ### copyOf

    public static WXMSectorSizes copyOf​(WXMDeviceType.WXMSectorSizesType instance)
    Creates an immutable copy of a `WXMDeviceType.WXMSectorSizesType` 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 WXMSectorSizes instance

  - ### builder

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

         WXMSectorSizes.builder()
            .setLogical(java.math.BigInteger) // required logical
            .setPhysical(java.math.BigInteger) // optional physical
            .build();

    Returns:
      A new WXMSectorSizes builder