private JCGLClearSpecification(JCGLClearSpecification.Builder builder) { this.colorBufferClear = builder.colorBufferClear; this.depthBufferClear = builder.depthBufferClear; this.stencilBufferClear = builder.stencilBufferClear; this.strictChecking = builder.strictCheckingIsSet() ? builder.strictChecking : JCGLClearSpecificationType.super.getStrictChecking(); }
/** * @return {@code true} if strict buffer checking is enabled */ @Override public final boolean getStrictChecking() { return strictCheckingIsSet() ? strictChecking : JCGLClearSpecificationType.super.getStrictChecking(); }
/** * Fill this modifiable instance with attribute values from the provided {@link JCGLClearSpecificationType} instance. * Regular attribute values will be overridden, i.e. replaced with ones of an instance. * Any of the instance's absent optional values will not be copied (will not override current values). * @param instance The instance from which to copy values * @return {@code this} for use in a chained invocation */ public JCGLClearSpecificationMutable from(JCGLClearSpecificationType instance) { Objects.requireNonNull(instance, "instance"); Optional<VectorReadable4FType> colorBufferClearOptional = instance.getColorBufferClear(); if (colorBufferClearOptional.isPresent()) { setColorBufferClear(colorBufferClearOptional); } OptionalDouble depthBufferClearOptional = instance.getDepthBufferClear(); if (depthBufferClearOptional.isPresent()) { setDepthBufferClear(depthBufferClearOptional); } OptionalInt stencilBufferClearOptional = instance.getStencilBufferClear(); if (stencilBufferClearOptional.isPresent()) { setStencilBufferClear(stencilBufferClearOptional); } setStrictChecking(instance.getStrictChecking()); return this; }
/** * Fill a builder with attribute values from the provided {@code JCGLClearSpecificationType} 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(JCGLClearSpecificationType instance) { Objects.requireNonNull(instance, "instance"); Optional<VectorReadable4FType> colorBufferClearOptional = instance.getColorBufferClear(); if (colorBufferClearOptional.isPresent()) { setColorBufferClear(colorBufferClearOptional); } OptionalDouble depthBufferClearOptional = instance.getDepthBufferClear(); if (depthBufferClearOptional.isPresent()) { setDepthBufferClear(depthBufferClearOptional); } OptionalInt stencilBufferClearOptional = instance.getStencilBufferClear(); if (stencilBufferClearOptional.isPresent()) { setStencilBufferClear(stencilBufferClearOptional); } setStrictChecking(instance.getStrictChecking()); return this; }