/** * Fill a builder with attribute values from the provided {@code SMFSchemaIdentifierType} instance. * Regular attribute values will be replaced with those from the given instance. * Absent optional values will not replace present values. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ public final Builder from(SMFSchemaIdentifierType instance) { Objects.requireNonNull(instance, "instance"); setName(instance.name()); setVersionMajor(instance.versionMajor()); setVersionMinor(instance.versionMinor()); return this; }
/** * Builds a new {@link SMFSchemaIdentifier SMFSchemaIdentifier}. * @return An immutable instance of SMFSchemaIdentifier * @throws java.lang.IllegalStateException if any required attributes are missing */ public SMFSchemaIdentifier build() { if (initBits != 0) { throw new IllegalStateException(formatRequiredAttributesMessage()); } return new SMFSchemaIdentifier(this); }
/** * Fill a builder with attribute values from the provided {@code SMFSchemaIdentifierType} instance. * Regular attribute values will be replaced with those from the given instance. * Absent optional values will not replace present values. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ public final Builder from(SMFSchemaIdentifierType instance) { Objects.requireNonNull(instance, "instance"); setVendorID(instance.vendorID()); setSchemaID(instance.schemaID()); setSchemaMajorVersion(instance.schemaMajorVersion()); setSchemaMinorVersion(instance.schemaMinorVersion()); return this; }
return valid(create( SMFSchemaIdentifier.builder() .setName(schema) .setVersionMajor(major) .setVersionMinor(minor).build())); } catch (final IllegalArgumentException e) { return errorExpectedGotValidation(file, line, makeSyntax(), text);
return valid(create( SMFSchemaIdentifier.builder() .setName(schema) .setVersionMajor(major) .setVersionMinor(minor).build())); } catch (final IllegalArgumentException e) { return SMFFilterCommandParsing.errorExpectedGotValidation(
/** * Creates an immutable copy of a {@link SMFSchemaIdentifierType} 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 SMFSchemaIdentifier instance */ public static SMFSchemaIdentifier copyOf(SMFSchemaIdentifierType instance) { if (instance instanceof SMFSchemaIdentifier) { return (SMFSchemaIdentifier) instance; } return SMFSchemaIdentifier.builder() .from(instance) .build(); }
/** * Creates an immutable copy of a {@link SMFSchemaIdentifierType} 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 SMFSchemaIdentifier instance */ public static SMFSchemaIdentifier copyOf(SMFSchemaIdentifierType instance) { if (instance instanceof SMFSchemaIdentifier) { return (SMFSchemaIdentifier) instance; } return SMFSchemaIdentifier.builder() .from(instance) .build(); }
/** * Creates a builder for {@link SMFSchemaIdentifier SMFSchemaIdentifier}. * @return A new SMFSchemaIdentifier builder */ public static SMFSchemaIdentifier.Builder builder() { return new SMFSchemaIdentifier.Builder(); }
/** * Creates a builder for {@link SMFSchemaIdentifier SMFSchemaIdentifier}. * @return A new SMFSchemaIdentifier builder */ public static SMFSchemaIdentifier.Builder builder() { return new SMFSchemaIdentifier.Builder(); }