/** * Construct a modifiable instance of {@code JCGLClearSpecificationType}. * @param colorBufferClear The value for the {@link JCGLClearSpecificationType#getColorBufferClear() colorBufferClear} attribute * @param depthBufferClear The value for the {@link JCGLClearSpecificationType#getDepthBufferClear() depthBufferClear} attribute * @param stencilBufferClear The value for the {@link JCGLClearSpecificationType#getStencilBufferClear() stencilBufferClear} attribute * @param strictChecking The value for the {@link JCGLClearSpecificationType#getStrictChecking() strictChecking} attribute * @return A new modifiable instance */ public static JCGLClearSpecificationMutable create(Optional<VectorReadable4FType> colorBufferClear, OptionalDouble depthBufferClear, OptionalInt stencilBufferClear, boolean strictChecking) { return new JCGLClearSpecificationMutable() .setColorBufferClear(colorBufferClear) .setDepthBufferClear(depthBufferClear) .setStencilBufferClear(stencilBufferClear) .setStrictChecking(strictChecking); }
/** * Construct a modifiable instance of {@code JCGLClearSpecificationType}. * @param colorBufferClear The value for the {@link JCGLClearSpecificationType#colorBufferClear() colorBufferClear} attribute * @param depthBufferClear The value for the {@link JCGLClearSpecificationType#depthBufferClear() depthBufferClear} attribute * @param stencilBufferClear The value for the {@link JCGLClearSpecificationType#stencilBufferClear() stencilBufferClear} attribute * @param strictChecking The value for the {@link JCGLClearSpecificationType#strictChecking() strictChecking} attribute * @return A new modifiable instance */ public static JCGLClearSpecificationMutable create(Optional<Vector4D> colorBufferClear, OptionalDouble depthBufferClear, OptionalInt stencilBufferClear, boolean strictChecking) { return new JCGLClearSpecificationMutable() .setColorBufferClear(colorBufferClear) .setDepthBufferClear(depthBufferClear) .setStencilBufferClear(stencilBufferClear) .setStrictChecking(strictChecking); }
/** * 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 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<Vector4D> colorBufferClearOptional = instance.colorBufferClear(); if (colorBufferClearOptional.isPresent()) { setColorBufferClear(colorBufferClearOptional); } OptionalDouble depthBufferClearOptional = instance.depthBufferClear(); if (depthBufferClearOptional.isPresent()) { setDepthBufferClear(depthBufferClearOptional); } OptionalInt stencilBufferClearOptional = instance.stencilBufferClear(); if (stencilBufferClearOptional.isPresent()) { setStencilBufferClear(stencilBufferClearOptional); } setStrictChecking(instance.strictChecking()); return this; }