Class WXMDeviceE1000

java.lang.Object
com.io7m.waxmill.machines.WXMDeviceE1000
All Implemented Interfaces:
WXMDeviceType, WXMDeviceType.WXMDeviceE1000Type

public final class WXMDeviceE1000
extends java.lang.Object
implements WXMDeviceType.WXMDeviceE1000Type
An emulation of an Intel e82545 network device.
  • Method Details

    • comment

      public java.lang.String comment()
      Specified by:
      comment in interface WXMDeviceType
      Specified by:
      comment in interface WXMDeviceType.WXMDeviceE1000Type
      Returns:
      The value of the comment attribute
    • deviceSlot

      public WXMDeviceSlot deviceSlot()
      Specified by:
      deviceSlot in interface WXMDeviceType
      Specified by:
      deviceSlot in interface WXMDeviceType.WXMDeviceE1000Type
      Returns:
      The value of the deviceSlot attribute
    • backend

      Specified by:
      backend in interface WXMDeviceType.WXMDeviceE1000Type
      Returns:
      The underlying device backend
    • withComment

      public final WXMDeviceE1000 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
    • withDeviceSlot

      public final WXMDeviceE1000 withDeviceSlot​(WXMDeviceSlot value)
      Copy the current immutable object by setting a value for the deviceSlot attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for deviceSlot
      Returns:
      A modified copy of the this object
    • withBackend

      public final WXMDeviceE1000 withBackend​(WXMDeviceType.WXMNetworkDeviceBackendType value)
      Copy the current immutable object by setting a value for the backend attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for backend
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals​(java.lang.Object another)
      This instance is equal to all instances of WXMDeviceE1000 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: comment, deviceSlot, backend.
      Overrides:
      hashCode in class java.lang.Object
      Returns:
      hashCode value
    • toString

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

      public static WXMDeviceE1000 copyOf​(WXMDeviceType.WXMDeviceE1000Type instance)
      Creates an immutable copy of a WXMDeviceType.WXMDeviceE1000Type 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 WXMDeviceE1000 instance
    • builder

      public static WXMDeviceE1000.Builder builder()
      Creates a builder for WXMDeviceE1000.
       WXMDeviceE1000.builder()
          .setComment(String) // optional comment
          .setDeviceSlot(com.io7m.waxmill.machines.WXMDeviceSlot) // required deviceSlot
          .setBackend(com.io7m.waxmill.machines.WXMDeviceType.WXMNetworkDeviceBackendType) // required backend
          .build();
       
      Returns:
      A new WXMDeviceE1000 builder