/** * Copy the current immutable object by setting a value for the {@link SMFSchemaNameType#value() value} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for value * @return A modified copy of the {@code this} object */ public final SMFSchemaName withValue(String value) { if (this.value.equals(value)) return this; String newValue = Objects.requireNonNull(value, "value"); return validate(new SMFSchemaName(this, newValue)); }
/** * Builds a new {@link SMFSchemaName SMFSchemaName}. * @return An immutable instance of SMFSchemaName * @throws java.lang.IllegalStateException if any required attributes are missing */ public SMFSchemaName build() { if (initBits != 0) { throw new IllegalStateException(formatRequiredAttributesMessage()); } return SMFSchemaName.validate(new SMFSchemaName(null, value)); }
/** * Construct a new immutable {@code SMFSchemaName} instance. * @param value The value for the {@code value} attribute * @return An immutable SMFSchemaName instance */ public static SMFSchemaName of(String value) { return validate(new SMFSchemaName(value)); }