/** * Construct a new immutable {@code SMFFormatVersion} instance. * @param major The value for the {@code major} attribute * @param minor The value for the {@code minor} attribute * @return An immutable SMFFormatVersion instance */ public static SMFFormatVersion of(int major, int minor) { return new SMFFormatVersion(major, minor); }
/** * Construct a new immutable {@code SMFFormatVersion} instance. * @param major The value for the {@code major} attribute * @param minor The value for the {@code minor} attribute * @return An immutable SMFFormatVersion instance */ public static SMFFormatVersion of(int major, int minor) { return new SMFFormatVersion(major, minor); }
/** * Copy the current immutable object by setting a value for the {@link SMFFormatVersionType#minor() minor} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for minor * @return A modified copy of the {@code this} object */ public final SMFFormatVersion withMinor(int value) { if (this.minor == value) return this; return new SMFFormatVersion(this.major, value); }
/** * Copy the current immutable object by setting a value for the {@link SMFFormatVersionType#major() major} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for major * @return A modified copy of the {@code this} object */ public final SMFFormatVersion withMajor(int value) { if (this.major == value) return this; return new SMFFormatVersion(value, this.minor); }
/** * Copy the current immutable object by setting a value for the {@link SMFFormatVersionType#major() major} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for major * @return A modified copy of the {@code this} object */ public final SMFFormatVersion withMajor(int value) { if (this.major == value) return this; return new SMFFormatVersion(value, this.minor); }
/** * Copy the current immutable object by setting a value for the {@link SMFFormatVersionType#minor() minor} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for minor * @return A modified copy of the {@code this} object */ public final SMFFormatVersion withMinor(int value) { if (this.minor == value) return this; return new SMFFormatVersion(this.major, value); }
/** * Builds a new {@link SMFFormatVersion SMFFormatVersion}. * @return An immutable instance of SMFFormatVersion * @throws java.lang.IllegalStateException if any required attributes are missing */ public SMFFormatVersion build() { if (initBits != 0) { throw new IllegalStateException(formatRequiredAttributesMessage()); } return new SMFFormatVersion(major, minor); }
/** * Builds a new {@link SMFFormatVersion SMFFormatVersion}. * @return An immutable instance of SMFFormatVersion * @throws java.lang.IllegalStateException if any required attributes are missing */ public SMFFormatVersion build() { if (initBits != 0) { throw new IllegalStateException(formatRequiredAttributesMessage()); } return new SMFFormatVersion(major, minor); }