Class FormatXML1RuntimeChildHash

java.lang.Object
com.io7m.coffeepick.runtime.format.xml.FormatXML1RuntimeChildHash
All Implemented Interfaces:
FormatXML1RuntimeChildType, FormatXML1RuntimeChildType.FormatXML1RuntimeChildHashType

public final class FormatXML1RuntimeChildHash
extends java.lang.Object
implements FormatXML1RuntimeChildType.FormatXML1RuntimeChildHashType
The hash element.
  • Method Details

    • hash

      public RuntimeHash hash()
      Specified by:
      hash in interface FormatXML1RuntimeChildType.FormatXML1RuntimeChildHashType
      Returns:
      The hash value
    • withHash

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

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

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

      public static FormatXML1RuntimeChildHash of​(RuntimeHash hash)
      Construct a new immutable FormatXML1RuntimeChildHash instance.
      Parameters:
      hash - The value for the hash attribute
      Returns:
      An immutable FormatXML1RuntimeChildHash instance
    • copyOf

      Creates an immutable copy of a FormatXML1RuntimeChildType.FormatXML1RuntimeChildHashType 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 FormatXML1RuntimeChildHash instance
    • builder

      public static FormatXML1RuntimeChildHash.Builder builder()
      Creates a builder for FormatXML1RuntimeChildHash.
       FormatXML1RuntimeChildHash.builder()
          .setHash(com.io7m.coffeepick.runtime.RuntimeHash) // required hash
          .build();
       
      Returns:
      A new FormatXML1RuntimeChildHash builder