Class CTicketSystem

java.lang.Object
com.io7m.changelog.core.CTicketSystem
All Implemented Interfaces:
CTicketSystemType

public final class CTicketSystem
extends java.lang.Object
implements CTicketSystemType
The definition of a ticket system.
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  CTicketSystem.Builder
    Builds instances of type CTicketSystem.
  • Method Summary

    Modifier and Type Method Description
    static CTicketSystem.Builder builder()
    Creates a builder for CTicketSystem.
    static CTicketSystem copyOf​(CTicketSystemType instance)
    Creates an immutable copy of a CTicketSystemType value.
    boolean equals​(java.lang.Object another)
    This instance is equal to all instances of CTicketSystem that have equal attribute values.
    int hashCode()
    Computes a hash code from attributes: id, uri, isDefault.
    java.lang.String id()  
    boolean isDefault()  
    java.lang.String toString()
    Prints the immutable value CTicketSystem with attribute values.
    java.net.URI uri()  
    CTicketSystem withDefault​(boolean value)
    Copy the current immutable object by setting a value for the default attribute.
    CTicketSystem withId​(java.lang.String value)
    Copy the current immutable object by setting a value for the id attribute.
    CTicketSystem withUri​(java.net.URI value)
    Copy the current immutable object by setting a value for the uri attribute.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Method Details

    • id

      public java.lang.String id()
      Specified by:
      id in interface CTicketSystemType
      Returns:
      The ID of the ticket system
    • uri

      public java.net.URI uri()
      Specified by:
      uri in interface CTicketSystemType
      Returns:
      The URI for the ticket system
    • isDefault

      public boolean isDefault()
      Specified by:
      isDefault in interface CTicketSystemType
      Returns:
      true if the ticket system is the current default
    • withId

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

      public final CTicketSystem withUri​(java.net.URI value)
      Copy the current immutable object by setting a value for the uri attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for uri
      Returns:
      A modified copy of the this object
    • withDefault

      public final CTicketSystem withDefault​(boolean value)
      Copy the current immutable object by setting a value for the default attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for isDefault
      Returns:
      A modified copy of the this object
    • equals

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

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

      public static CTicketSystem copyOf​(CTicketSystemType instance)
      Creates an immutable copy of a CTicketSystemType 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 CTicketSystem instance
    • builder

      public static CTicketSystem.Builder builder()
      Creates a builder for CTicketSystem.
       CTicketSystem.builder()
          .setId(String) // required id
          .setUri(java.net.URI) // required uri
          .setDefault(boolean) // optional default
          .build();
       
      Returns:
      A new CTicketSystem builder