/** * Creates an immutable copy of a {@link CTicketSystemType} value. * Uses accessors to get values to initialize the new immutable instance. * If an instance is already immutable, it is returned as is. * @param instance The instance to copy * @return A copied immutable CTicketSystem instance */ public static CTicketSystem copyOf(CTicketSystemType instance) { if (instance instanceof CTicketSystem) { return (CTicketSystem) instance; } return CTicketSystem.builder() .from(instance) .build(); }
/** * Creates an immutable copy of a {@link CTicketSystemType} value. * Uses accessors to get values to initialize the new immutable instance. * If an instance is already immutable, it is returned as is. * @param instance The instance to copy * @return A copied immutable CTicketSystem instance */ public static CTicketSystem copyOf(CTicketSystemType instance) { if (instance instanceof CTicketSystem) { return (CTicketSystem) instance; } return CTicketSystem.builder() .from(instance) .build(); }
private void onEndTicketSystem() { final CTicketSystem ts = this.ticket_system_builder.build(); this.changelog_builder.putTicketSystems(ts.id(), ts); }