private boolean equalTo(SMFAttribute another) { return name.equals(another.name) && componentType.equals(another.componentType) && componentCount == another.componentCount && componentSizeBits == another.componentSizeBits && componentSizeOctets == another.componentSizeOctets && sizeOctets == another.sizeOctets; }
/** * Converts to {@link SMFFormatVersion SMFFormatVersion}. * @return An immutable instance of SMFFormatVersion */ public final SMFFormatVersion toImmutable() { checkRequiredAttributes(); return SMFFormatVersion.copyOf(this); }
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)); }
private boolean equalTo(SMFHeader another) { return triangles.equals(another.triangles) && vertexCount == another.vertexCount && schemaIdentifier.equals(another.schemaIdentifier) && coordinateSystem.equals(another.coordinateSystem) && this.attributesInOrder().equals(another.attributesInOrder()) && attributesByName.equals(another.attributesByName) && metaCount == another.metaCount; }
/** * Construct a modifiable instance of {@code SMFFormatVersionType}. * @param major The value for the {@link SMFFormatVersionType#major() major} attribute * @param minor The value for the {@link SMFFormatVersionType#minor() minor} attribute * @return A new modifiable instance */ public static SMFFormatVersionMutable create(int major, int minor) { return new SMFFormatVersionMutable() .setMajor(major) .setMinor(minor); }
private SMFCoordinateSystem(SMFCoordinateSystem.Builder builder) { if (builder.axes != null) { initShim.setAxes(builder.axes); } if (builder.windingOrder != null) { initShim.setWindingOrder(builder.windingOrder); } this.axes = initShim.axes(); this.windingOrder = initShim.windingOrder(); this.initShim = null; }
/** * @return The major number for a format */ @Override public final int major() { if (!majorIsSet()) { checkRequiredAttributes(); } return major; }
/** * 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); }
/** * This instance is equal to all instances of {@code SMFAttributeName} that have equal attribute values. * @return {@code true} if {@code this} is equal to {@code another} instance */ @Override public boolean equals(Object another) { if (this == another) return true; return another instanceof SMFAttributeName && equalTo((SMFAttributeName) another); }
/** * This instance is equal to all instances of {@code SMFTriangles} that have equal attribute values. * @return {@code true} if {@code this} is equal to {@code another} instance */ @Override public boolean equals(Object another) { if (this == another) return true; return another instanceof SMFTriangles && equalTo((SMFTriangles) another); }
/** * Builds a new {@link SMFTriangles SMFTriangles}. * @return An immutable instance of SMFTriangles * @throws java.lang.IllegalStateException if any required attributes are missing */ public SMFTriangles build() { return SMFTriangles.validate(new SMFTriangles(this)); }
/** * This instance is equal to all instances of {@code SMFHeader} that have equal attribute values. * @return {@code true} if {@code this} is equal to {@code another} instance */ @Override public boolean equals(Object another) { if (this == another) return true; return another instanceof SMFHeader && equalTo((SMFHeader) another); }
/** * This instance is equal to all instances of {@code SMFSchemaIdentifier} that have equal attribute values. * @return {@code true} if {@code this} is equal to {@code another} instance */ @Override public boolean equals(Object another) { if (this == another) return true; return another instanceof SMFSchemaIdentifier && equalTo((SMFSchemaIdentifier) another); }
/** * @return The triangle information for the file */ @Override public SMFTriangles triangles() { InitShim shim = this.initShim; return shim != null ? shim.triangles() : this.triangles; }
/** * @return The coordinate system of the mesh data */ @Override public SMFCoordinateSystem coordinateSystem() { InitShim shim = this.initShim; return shim != null ? shim.coordinateSystem() : this.coordinateSystem; }
/** * This instance is equal to all instances of {@code SMFSchemaName} that have equal attribute values. * @return {@code true} if {@code this} is equal to {@code another} instance */ @Override public boolean equals(Object another) { if (this == another) return true; return another instanceof SMFSchemaName && equalTo((SMFSchemaName) another); }
/** * @return The vendor ID */ @Override public int vendorID() { InitShim shim = this.initShim; return shim != null ? shim.vendorID() : this.vendorID; }
private boolean equalTo(SMFAttribute another) { return name.equals(another.name) && componentType.equals(another.componentType) && componentCount == another.componentCount && componentSizeBits == another.componentSizeBits && componentSizeOctets == another.componentSizeOctets && sizeOctets == another.sizeOctets; }
/** * Converts to {@link SMFFormatVersion SMFFormatVersion}. * @return An immutable instance of SMFFormatVersion */ public final SMFFormatVersion toImmutable() { checkRequiredAttributes(); return SMFFormatVersion.copyOf(this); }
/** * 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); }