/** * Creates an immutable copy of a {@link SMFFormatVersionType} 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 SMFFormatVersion instance */ public static SMFFormatVersion copyOf(SMFFormatVersionType instance) { if (instance instanceof SMFFormatVersion) { return (SMFFormatVersion) instance; } return SMFFormatVersion.builder() .from(instance) .build(); }
/** * Creates an immutable copy of a {@link SMFFormatVersionType} 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 SMFFormatVersion instance */ public static SMFFormatVersion copyOf(SMFFormatVersionType instance) { if (instance instanceof SMFFormatVersion) { return (SMFFormatVersion) instance; } return SMFFormatVersion.builder() .from(instance) .build(); }