- java.lang.Object
-
- com.io7m.changelog.core.CTicketSystem
-
- All Implemented Interfaces:
CTicketSystemType
public final class CTicketSystem extends 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CTicketSystem.Builderbuilder()Creates a builder forCTicketSystem.static CTicketSystemcopyOf(CTicketSystemType instance)Creates an immutable copy of aCTicketSystemTypevalue.booleanequals(Object another)This instance is equal to all instances ofCTicketSystemthat have equal attribute values.inthashCode()Computes a hash code from attributes:id,uri,isDefault.Stringid()booleanisDefault()static CTicketSystemof(String id, URI uri, boolean isDefault)Construct a new immutableCTicketSysteminstance.StringtoString()Prints the immutable valueCTicketSystemwith attribute values.URIuri()CTicketSystemwithDefault(boolean value)Copy the current immutable object by setting a value for thedefaultattribute.CTicketSystemwithId(String value)Copy the current immutable object by setting a value for theidattribute.CTicketSystemwithUri(URI value)Copy the current immutable object by setting a value for theuriattribute.
-
-
-
Method Detail
-
id
public String id()
- Specified by:
idin interfaceCTicketSystemType- Returns:
- The ID of the ticket system
-
uri
public 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
public final CTicketSystem withId(String value)
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
public final CTicketSystem withUri(URI value)
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
public final CTicketSystem withDefault(boolean value)
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(Object another)
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
public String toString()
Prints the immutable valueCTicketSystemwith attribute values.
-
of
public static CTicketSystem of(String id, URI uri, boolean isDefault)
Construct a new immutableCTicketSysteminstance.- Parameters:
id- The value for theidattributeuri- The value for theuriattributeisDefault- The value for theisDefaultattribute- Returns:
- An immutable CTicketSystem instance
-
copyOf
public static CTicketSystem copyOf(CTicketSystemType instance)
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
public static CTicketSystem.Builder builder()
Creates a builder forCTicketSystem.- Returns:
- A new CTicketSystem builder
-
-