/** * Copy the current immutable object by setting a value for the {@link SMFHeaderType#coordinateSystem() coordinateSystem} attribute. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for coordinateSystem * @return A modified copy of the {@code this} object */ public final SMFHeader withCoordinateSystem(SMFCoordinateSystem value) { if (this.coordinateSystem == value) return this; SMFCoordinateSystem newValue = Objects.requireNonNull(value, "coordinateSystem"); return validate(new SMFHeader(this, this.triangles, this.vertexCount, this.schemaIdentifier, newValue, this.attributesInOrder)); }
/** * Copy the current immutable object by setting a <i>present</i> value for the optional {@link SMFHeaderType#schemaIdentifier() schemaIdentifier} attribute. * @param value The value for schemaIdentifier * @return A modified copy of {@code this} object */ public final SMFHeader withSchemaIdentifier(SMFSchemaIdentifier value) { SMFSchemaIdentifier newValue = Objects.requireNonNull(value, "schemaIdentifier"); if (this.schemaIdentifier == newValue) return this; return validate(new SMFHeader(this, this.triangles, this.vertexCount, newValue, this.coordinateSystem, this.attributesInOrder)); }
/** * Copy the current immutable object by setting an optional value for the {@link SMFHeaderType#schemaIdentifier() schemaIdentifier} attribute. * A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning {@code this}. * @param optional A value for schemaIdentifier * @return A modified copy of {@code this} object */ public final SMFHeader withSchemaIdentifier(Optional<? extends SMFSchemaIdentifier> optional) { SMFSchemaIdentifier value = optional.orElse(null); if (this.schemaIdentifier == value) return this; return validate(new SMFHeader(this, this.triangles, this.vertexCount, value, this.coordinateSystem, this.attributesInOrder)); }
/** * Construct a new immutable {@code SMFHeader} instance. * @param triangles The value for the {@code triangles} attribute * @param vertexCount The value for the {@code vertexCount} attribute * @param schemaIdentifier The value for the {@code schemaIdentifier} attribute * @param coordinateSystem The value for the {@code coordinateSystem} attribute * @param attributesInOrder The value for the {@code attributesInOrder} attribute * @return An immutable SMFHeader instance */ public static SMFHeader of(SMFTriangles triangles, long vertexCount, Optional<SMFSchemaIdentifier> schemaIdentifier, SMFCoordinateSystem coordinateSystem, List<SMFAttribute> attributesInOrder) { return validate(new SMFHeader(triangles, vertexCount, schemaIdentifier, coordinateSystem, attributesInOrder)); }
/** * Construct a new immutable {@code SMFHeader} instance. * @param triangles The value for the {@code triangles} attribute * @param vertexCount The value for the {@code vertexCount} attribute * @param schemaIdentifier The value for the {@code schemaIdentifier} attribute * @param coordinateSystem The value for the {@code coordinateSystem} attribute * @param attributesInOrder The value for the {@code attributesInOrder} attribute * @param metaCount The value for the {@code metaCount} attribute * @return An immutable SMFHeader instance */ public static SMFHeader of(SMFTriangles triangles, long vertexCount, SMFSchemaIdentifier schemaIdentifier, SMFCoordinateSystem coordinateSystem, List<SMFAttribute> attributesInOrder, long metaCount) { return validate(new SMFHeader(triangles, vertexCount, schemaIdentifier, coordinateSystem, attributesInOrder, metaCount)); }
/** * Copy the current immutable object by setting a value for the {@link SMFHeaderType#triangles() triangles} attribute. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for triangles * @return A modified copy of the {@code this} object */ public final SMFHeader withTriangles(SMFTriangles value) { if (this.triangles == value) return this; SMFTriangles newValue = Objects.requireNonNull(value, "triangles"); return validate(new SMFHeader( this, newValue, this.vertexCount, this.schemaIdentifier, this.coordinateSystem, this.attributesInOrder, this.metaCount)); }
/** * Copy the current immutable object by setting a value for the {@link SMFHeaderType#vertexCount() vertexCount} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for vertexCount * @return A modified copy of the {@code this} object */ public final SMFHeader withVertexCount(long value) { if (this.vertexCount == value) return this; return validate(new SMFHeader( this, this.triangles, value, this.schemaIdentifier, this.coordinateSystem, this.attributesInOrder, this.metaCount)); }
/** * Copy the current immutable object by setting a value for the {@link SMFHeaderType#vertexCount() vertexCount} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for vertexCount * @return A modified copy of the {@code this} object */ public final SMFHeader withVertexCount(long value) { if (this.vertexCount == value) return this; return validate(new SMFHeader( this, this.triangles, value, this.schemaIdentifier, this.coordinateSystem, this.attributesInOrder)); }
/** * Copy the current immutable object by setting a value for the {@link SMFHeaderType#metaCount() metaCount} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for metaCount * @return A modified copy of the {@code this} object */ public final SMFHeader withMetaCount(long value) { if (this.metaCount == value) return this; return validate(new SMFHeader( this, this.triangles, this.vertexCount, this.schemaIdentifier, this.coordinateSystem, this.attributesInOrder, value)); }
/** * Copy the current immutable object by setting a value for the {@link SMFHeaderType#triangles() triangles} attribute. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for triangles * @return A modified copy of the {@code this} object */ public final SMFHeader withTriangles(SMFTriangles value) { if (this.triangles == value) return this; SMFTriangles newValue = Objects.requireNonNull(value, "triangles"); return validate(new SMFHeader( this, newValue, this.vertexCount, this.schemaIdentifier, this.coordinateSystem, this.attributesInOrder)); }
/** * Copy the current immutable object by setting a value for the {@link SMFHeaderType#schemaIdentifier() schemaIdentifier} attribute. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for schemaIdentifier * @return A modified copy of the {@code this} object */ public final SMFHeader withSchemaIdentifier(SMFSchemaIdentifier value) { if (this.schemaIdentifier == value) return this; SMFSchemaIdentifier newValue = Objects.requireNonNull(value, "schemaIdentifier"); return validate(new SMFHeader( this, this.triangles, this.vertexCount, newValue, this.coordinateSystem, this.attributesInOrder, this.metaCount)); }
/** * Copy the current immutable object by setting a value for the {@link SMFHeaderType#coordinateSystem() coordinateSystem} attribute. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for coordinateSystem * @return A modified copy of the {@code this} object */ public final SMFHeader withCoordinateSystem(SMFCoordinateSystem value) { if (this.coordinateSystem == value) return this; SMFCoordinateSystem newValue = Objects.requireNonNull(value, "coordinateSystem"); return validate(new SMFHeader( this, this.triangles, this.vertexCount, this.schemaIdentifier, newValue, this.attributesInOrder, this.metaCount)); }
public SMFHeader withAttributesInOrder(List<SMFAttribute> value) { List<SMFAttribute> newValue = attributesInOrder_from(value); if (this.attributesInOrder == newValue) return this; return validate(new SMFHeader(this, this.triangles, this.vertexCount, this.schemaIdentifier, this.coordinateSystem, newValue)); }
public SMFHeader withAttributesInOrder(List<SMFAttribute> value) { List<SMFAttribute> newValue = attributesInOrder_from(value); if (this.attributesInOrder == newValue) return this; return validate(new SMFHeader( this, this.triangles, this.vertexCount, this.schemaIdentifier, this.coordinateSystem, newValue, this.metaCount)); }