com.io7m.jpra.runtime.java

## Class JPRATypeModel.JPRAUserDefined

- java.lang.Object
- - com.io7m.jpra.runtime.java.JPRATypeModelType.JPRAUserDefinedType
  - - com.io7m.jpra.runtime.java.JPRATypeModel.JPRAUserDefined

- All Implemented Interfaces:
    JPRATypeModelType.JPRATypeType
  Enclosing class:
    JPRATypeModel

      public static final class JPRATypeModel.JPRAUserDefined
      extends JPRATypeModelType.JPRAUserDefinedType

  Immutable implementation of `JPRATypeModelType.JPRAUserDefinedType`.

  Use the static factory method to create immutable instances: `JPRATypeModel.JPRAUserDefined.of()`.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static JPRATypeModel.JPRAUserDefined` | `copyOf(JPRATypeModelType.JPRAUserDefinedType instance)` Creates an immutable copy of a `JPRATypeModelType.JPRAUserDefinedType` value.
    `boolean` | `equals(Object another)` This instance is equal to all instances of `JPRAUserDefined` that have equal attribute values.
    `int` | `hashCode()` Returns a precomputed-on-construction hash code from attributes: `type`.
    `static JPRATypeModel.JPRAUserDefined` | `of(Class<? extends JPRAValueType> type)` Construct a new immutable `JPRAUserDefined` instance.
    `String` | `toString()` Prints the immutable value `JPRAUserDefined...` with all non-generated and non-auxiliary attribute values.
    `Class<? extends JPRAValueType>` | `type()`
    `JPRATypeModel.JPRAUserDefined` | `withType(Class<? extends JPRAValueType> value)` Copy the current immutable object by setting a value for the `type` attribute.

    - ### Methods inherited from class com.io7m.jpra.runtime.java.JPRATypeModelType.JPRAUserDefinedType

      `matchType`

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

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

- - ### Method Detail

    - #### type

          public Class<? extends JPRAValueType> type()

      Returns:
        The value of the `type` attribute

    - #### withType

          public final JPRATypeModel.JPRAUserDefined withType(Class<? extends JPRAValueType> value)

      Copy the current immutable object by setting a value for the `type` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
      Parameters:
        `value` - A new value for type
      Returns:
        A modified copy of the `this` object

    - #### equals

          public boolean equals(Object another)

      This instance is equal to all instances of `JPRAUserDefined` that have equal attribute values.
      Overrides:
        `equals` in class `Object`
      Returns:
        `true` if `this` is equal to `another` instance

    - #### hashCode

          public int hashCode()

      Returns a precomputed-on-construction hash code from attributes: `type`.
      Overrides:
        `hashCode` in class `Object`
      Returns:
        hashCode value

    - #### toString

          public String toString()

      Prints the immutable value `JPRAUserDefined...` with all non-generated and non-auxiliary attribute values.
      Overrides:
        `toString` in class `Object`
      Returns:
        A string representation of the value

    - #### of

          public static JPRATypeModel.JPRAUserDefined of(Class<? extends JPRAValueType> type)

      Construct a new immutable `JPRAUserDefined` instance.
      Parameters:
        `type` - The value for the `type` attribute
      Returns:
        An immutable JPRAUserDefined instance

    - #### copyOf

          public static JPRATypeModel.JPRAUserDefined copyOf(JPRATypeModelType.JPRAUserDefinedType instance)

      Creates an immutable copy of a `JPRATypeModelType.JPRAUserDefinedType` 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 JPRAUserDefined instance

Copyright © 2016 <code@io7m.com> http://io7m.com