Package com.io7m.changelog.core
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 classCTicketSystem.BuilderBuilds instances of typeCTicketSystem. -
Method Summary
Modifier and Type Method Description static CTicketSystem.Builderbuilder()Creates a builder forCTicketSystem.static CTicketSystemcopyOf(CTicketSystemType instance)Creates an immutable copy of aCTicketSystemTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofCTicketSystemthat have equal attribute values.inthashCode()Computes a hash code from attributes:id,uri,isDefault.java.lang.Stringid()booleanisDefault()java.lang.StringtoString()Prints the immutable valueCTicketSystemwith attribute values.java.net.URIuri()CTicketSystemwithDefault(boolean value)Copy the current immutable object by setting a value for thedefaultattribute.CTicketSystemwithId(java.lang.String value)Copy the current immutable object by setting a value for theidattribute.CTicketSystemwithUri(java.net.URI value)Copy the current immutable object by setting a value for theuriattribute.
-
Method Details
-
id
public java.lang.String id()- Specified by:
idin interfaceCTicketSystemType- Returns:
- The ID of the ticket system
-
uri
public java.net.URI uri()- Specified by:
uriin interfaceCTicketSystemType- Returns:
- The URI for the ticket system
-
isDefault
public boolean isDefault()- Specified by:
isDefaultin interfaceCTicketSystemType- Returns:
trueif the ticket system is the current default
-
withId
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
withUri
Copy the current immutable object by setting a value for theuriattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for uri- Returns:
- A modified copy of the
thisobject
-
withDefault
Copy the current immutable object by setting a value for thedefaultattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for isDefault- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofCTicketSystemthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:id,uri,isDefault.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueCTicketSystemwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aCTicketSystemTypevalue. 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
Creates a builder forCTicketSystem.CTicketSystem.builder() .setId(String) // requiredid.setUri(java.net.URI) // requireduri.setDefault(boolean) // optionaldefault.build();- Returns:
- A new CTicketSystem builder
-