Package com.io7m.waxmill.xml.vm.v1

# Class WXM1Comment

java.lang.Object
com.io7m.waxmill.xml.vm.v1.WXM1Comment

All Implemented Interfaces:
  `WXM1CommentType`

    public final class WXM1Comment
    extends java.lang.Object
    implements WXM1CommentType

Immutable implementation of `WXM1CommentType`.

Use the builder to create immutable instances: `WXM1Comment.builder()`. Use the static factory method to create immutable instances: `WXM1Comment.of()`.

- ## Nested Class Summary

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

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `static WXM1Comment.Builder` | `builder()` | Creates a builder for `WXM1Comment`.
  `static WXM1Comment` | `copyOf​(WXM1CommentType instance)` | Creates an immutable copy of a `WXM1CommentType` value.
  `boolean` | `equals​(java.lang.Object another)` | This instance is equal to all instances of `WXM1Comment` that have equal attribute values.
  `int` | `hashCode()` | Computes a hash code from attributes: `text`.
  `static WXM1Comment` | `of​(java.lang.String text)` | Construct a new immutable `WXM1Comment` instance.
  `java.lang.String` | `text()` |
  `java.lang.String` | `toString()` | Prints the immutable value `WXM1Comment` with attribute values.
  `WXM1Comment` | `withText​(java.lang.String value)` | Copy the current immutable object by setting a value for the `text` attribute.

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

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

- ## Method Details

  - ### text

    public java.lang.String text()
    Specified by:
      `text` in interface `WXM1CommentType`
    Returns:
      The value of the `text` attribute

  - ### withText

    public final WXM1Comment withText​(java.lang.String value)
    Copy the current immutable object by setting a value for the `text` attribute. An equals check used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for text
    Returns:
      A modified copy of the `this` object

  - ### equals

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

  - ### toString

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

  - ### of

    public static WXM1Comment of​(java.lang.String text)
    Construct a new immutable `WXM1Comment` instance.
    Parameters:
      `text` - The value for the `text` attribute
    Returns:
      An immutable WXM1Comment instance

  - ### copyOf

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

  - ### builder

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

         WXM1Comment.builder()
            .setText(String) // required text
            .build();

    Returns:
      A new WXM1Comment builder