Package com.io7m.changelog.core
Class CTicketSystem
java.lang.Object
com.io7m.changelog.core.CTicketSystem
- All Implemented Interfaces:
CTicketSystemType
The definition of a ticket system.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic CTicketSystem.Builderbuilder()Creates a builder forCTicketSystem.static CTicketSystemcopyOf(CTicketSystemType instance) Creates an immutable copy of aCTicketSystemTypevalue.booleanThis instance is equal to all instances ofCTicketSystemthat have equal attribute values.inthashCode()Computes a hash code from attributes:id,uri,isDefault.id()booleantoString()Prints the immutable valueCTicketSystemwith attribute values.uri()final CTicketSystemwithDefault(boolean value) Copy the current immutable object by setting a value for thedefaultattribute.final CTicketSystemCopy the current immutable object by setting a value for theidattribute.final CTicketSystemCopy the current immutable object by setting a value for theuriattribute.
-
Method Details
-
id
- Specified by:
idin interfaceCTicketSystemType- Returns:
- The ID of the ticket system
-
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
This instance is equal to all instances ofCTicketSystemthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,uri,isDefault. -
toString
Prints the immutable valueCTicketSystemwith attribute values. -
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
-