public long growStruct(int structId, StructType fieldType, int fieldDim, byte[] name) { //grow all the arrays with new value assert((IS_STRUCT_BIT&structId)!=0) : "must be valid struct"; int idx = STRUCT_MASK & structId; int newFieldIdx = fieldNames[idx].length; //add text lookup assert(isNotAlreadyDefined(this.fields[idx], name)) : "field of this name already defined."; //only 1 name is returned, the first is considered cannonical this.fieldNames[idx] = grow(this.fieldNames[idx], name); this.fieldTypes[idx] = grow(this.fieldTypes[idx], fieldType); this.fieldDims[idx] = grow(this.fieldDims[idx], fieldDim); this.fieldLocals[idx] = grow(this.fieldLocals[idx], null); long fieldId = ((long)(IS_STRUCT_BIT|(STRUCT_MASK & structId)))<<STRUCT_OFFSET | newFieldIdx; this.fields[idx].setValue(name, fieldId); return fieldId; }
public long growStruct(int structId, StructType fieldType, int fieldDim, byte[] name) { assert(null!=fieldType); assert(null!=this.fieldNames); //grow all the arrays with new value assert((IS_STRUCT_BIT&structId)!=0) : "must be valid struct"; int idx = STRUCT_MASK & structId; assert(null!=this.fieldNames[idx]) : "Bad field names for struct at "+idx+" in "+this.hashCode(); int newFieldIdx = this.fieldNames[idx].length; //add text lookup assert(isNotAlreadyDefined(this.fields[idx], name)) : "field of this name already defined."; //only 1 name is returned, the first is considered canonical this.fieldNames[idx] = ArrayGrow.appendToArray(this.fieldNames[idx], name); this.fieldTypes[idx] = ArrayGrow.appendToArray(this.fieldTypes[idx], fieldType, StructType.class); this.fieldDims[idx] = ArrayGrow.appendToArray(this.fieldDims[idx], fieldDim); this.fieldLocals[idx] = ArrayGrow.appendToArray(this.fieldLocals[idx], null, Object.class); this.fieldValidators[idx] = ArrayGrow.appendToArray(this.fieldValidators[idx], null, Object.class); this.fieldRequired[idx] = ArrayGrow.appendToArray(this.fieldRequired[idx], false); long fieldId = ((long)(IS_STRUCT_BIT|(STRUCT_MASK & structId)))<<STRUCT_OFFSET | newFieldIdx; this.fields[idx].setValue(name, fieldId); return fieldId; }
public long growStruct(int structId, StructType fieldType, int fieldDim, byte[] name) { assert(null!=fieldType); assert(null!=this.fieldNames); //grow all the arrays with new value assert((IS_STRUCT_BIT&structId)!=0) : "must be valid struct"; int idx = STRUCT_MASK & structId; assert(null!=this.fieldNames[idx]) : "Bad field names for struct at "+idx+" in "+this.hashCode(); int newFieldIdx = this.fieldNames[idx].length; //add text lookup assert(isNotAlreadyDefined(this.fields[idx], name)) : "field of this name already defined."; //only 1 name is returned, the first is considered canonical this.fieldNames[idx] = ArrayGrow.appendToArray(this.fieldNames[idx], name); this.fieldTypes[idx] = ArrayGrow.appendToArray(this.fieldTypes[idx], fieldType, StructType.class); this.fieldDims[idx] = ArrayGrow.appendToArray(this.fieldDims[idx], fieldDim); this.fieldLocals[idx] = ArrayGrow.appendToArray(this.fieldLocals[idx], null, Object.class); this.fieldValidators[idx] = ArrayGrow.appendToArray(this.fieldValidators[idx], null, Object.class); this.fieldRequired[idx] = ArrayGrow.appendToArray(this.fieldRequired[idx], false); long fieldId = ((long)(IS_STRUCT_BIT|(STRUCT_MASK & structId)))<<STRUCT_OFFSET | newFieldIdx; this.fields[idx].setValue(name, fieldId); return fieldId; }
long base = ((long)(IS_STRUCT_BIT|(STRUCT_MASK & structIdx)))<<STRUCT_OFFSET; while (--n>=0) { assert(isNotAlreadyDefined(fieldParser, fieldNames[n]));
long base = ((long)(IS_STRUCT_BIT|(STRUCT_MASK & structIdx)))<<STRUCT_OFFSET; while (--n>=0) { assert(isNotAlreadyDefined(fieldParser, fieldNames[n]));
long base = ((long)(IS_STRUCT_BIT|(STRUCT_MASK & structIdx)))<<STRUCT_OFFSET; while (--n>=0) { assert(isNotAlreadyDefined(fieldParser, fieldNames[n]));