/** * Copy the current immutable object by setting a value for the {@link RangeInclusiveIType#lower() lower} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for lower * @return A modified copy of the {@code this} object */ public final RangeInclusiveI withLower(int value) { if (this.lower == value) return this; return validate(new RangeInclusiveI(value, this.upper)); }
/** * Copy the current immutable object by setting a value for the {@link RangeInclusiveIType#upper() upper} attribute. * A value equality check is used to prevent copying of the same value by returning {@code this}. * @param value A new value for upper * @return A modified copy of the {@code this} object */ public final RangeInclusiveI withUpper(int value) { if (this.upper == value) return this; return validate(new RangeInclusiveI(this.lower, value)); }
/** * Construct a new immutable {@code RangeInclusiveI} instance. * @param lower The value for the {@code lower} attribute * @param upper The value for the {@code upper} attribute * @return An immutable RangeInclusiveI instance */ public static RangeInclusiveI of(int lower, int upper) { return validate(new RangeInclusiveI(lower, upper)); }
/** * Builds a new {@link RangeInclusiveI RangeInclusiveI}. * @return An immutable instance of RangeInclusiveI * @throws java.lang.IllegalStateException if any required attributes are missing */ public RangeInclusiveI build() { if (initBits != 0) { throw new IllegalStateException(formatRequiredAttributesMessage()); } return RangeInclusiveI.validate(new RangeInclusiveI(lower, upper)); }
this.valid_attribs = new RangeInclusiveI(0, this.max_attribs - 1);
this.valid_attribs = new RangeInclusiveI(0, this.max_attribs - 1);
FakeArrayObjects( final FakeContext c, final FakeArrayBuffers ga, final FakeIndexBuffers gi) throws JCGLExceptionNonCompliant { this.context = NullCheck.notNull(c); this.array_buffers = NullCheck.notNull(ga); this.index_buffers = NullCheck.notNull(gi); this.index_buffers.setArrayObjects(this); this.max_attribs = 16; this.valid_attribs = new RangeInclusiveI(0, this.max_attribs - 1); this.default_buffer = new FakeArrayObject( c, c.getFreshID(), new JCGLArrayVertexAttributeType[0]); this.bind = this.default_buffer; }
FakeArrayObjects( final FakeContext c, final FakeArrayBuffers ga, final FakeIndexBuffers gi) throws JCGLExceptionNonCompliant { this.context = NullCheck.notNull(c, "Context"); this.array_buffers = NullCheck.notNull(ga, "Array buffers"); this.index_buffers = NullCheck.notNull(gi, "Index buffers"); this.index_buffers.setArrayObjects(this); this.max_attribs = 16; this.valid_attribs = new RangeInclusiveI(0, this.max_attribs - 1); this.default_buffer = new FakeArrayObject( c, c.getFreshID(), true, null, new JCGLArrayVertexAttributeType[0]); this.bind = this.default_buffer; }