public StructBuilder removeFieldWithName(CharSequence name) { CharSequenceToUTF8 c = CharSequenceToUTF8Local.get().convert(name); int i = fieldCount; while (--i>=0) { byte[] field = fieldNames[i]; if (c.isEquals(field)) { //move it all down fieldCount--; //was this field on the end? if (i<fieldCount) { //value at location i must be removed System.arraycopy(fieldNames, i+1, fieldNames, i, fieldCount-i); System.arraycopy(fieldTypes, i+1, fieldTypes, i, fieldCount-i); System.arraycopy(fieldDims, i+1, fieldDims, i, fieldCount-i); } return this; } } throw new UnsupportedOperationException("Field "+name+" not found"); }
public StructBuilder removeFieldWithName(CharSequence name) { CharSequenceToUTF8 c = CharSequenceToUTF8Local.get().convert(name); int i = fieldCount; while (--i>=0) { byte[] field = fieldNames[i]; if (c.isEquals(field)) { //move it all down fieldCount--; //was this field on the end? if (i<fieldCount) { //value at location i must be removed System.arraycopy(fieldNames, i+1, fieldNames, i, fieldCount-i); System.arraycopy(fieldTypes, i+1, fieldTypes, i, fieldCount-i); System.arraycopy(fieldDims, i+1, fieldDims, i, fieldCount-i); } return this; } } throw new UnsupportedOperationException("Field "+name+" not found"); }
public StructBuilder removeFieldWithName(CharSequence name) { CharSequenceToUTF8 c = CharSequenceToUTF8Local.get().convert(name); int i = fieldCount; while (--i>=0) { byte[] field = fieldNames[i]; if (c.isEquals(field)) { //move it all down fieldCount--; //was this field on the end? if (i<fieldCount) { //value at location i must be removed System.arraycopy(fieldNames, i+1, fieldNames, i, fieldCount-i); System.arraycopy(fieldTypes, i+1, fieldTypes, i, fieldCount-i); System.arraycopy(fieldDims, i+1, fieldDims, i, fieldCount-i); } return this; } } throw new UnsupportedOperationException("Field "+name+" not found"); }