public int numberOfProperties() { ensureBlocksLoaded(); return blockRecordsCursor; }
@Override public Iterator<PropertyBlock> iterator() ensureBlocksLoaded(); return new Iterator<PropertyBlock>()
/** * Gets the sum of the sizes of the blocks in this record, in bytes. */ public int size() { ensureBlocksLoaded(); int result = 0; for ( int i = 0; i < blockRecordsCursor; i++ ) { result += blockRecords[i].getSize(); } return result; }
public PropertyBlock getPropertyBlock( int keyIndex ) { ensureBlocksLoaded(); for ( int i = 0; i < blockRecordsCursor; i++ ) { PropertyBlock block = blockRecords[i]; if ( block.getKeyIndexId() == keyIndex ) { return block; } } return null; }
public PropertyBlock removePropertyBlock( int keyIndex ) { ensureBlocksLoaded(); for ( int i = 0; i < blockRecordsCursor; i++ ) { if ( blockRecords[i].getKeyIndexId() == keyIndex ) { PropertyBlock block = blockRecords[i]; if ( --blockRecordsCursor > i ) { blockRecords[i] = blockRecords[blockRecordsCursor]; } return block; } } return null; }
public void addPropertyBlock( PropertyBlock block ) { ensureBlocksLoaded(); assert size() + block.getSize() <= PropertyType.getPayloadSize() : "Exceeded capacity of property record " + this + ". My current size is reported as " + size() + "The added block was " + block + " (note that size is " + block.getSize() + ")"; blockRecords[blockRecordsCursor++] = block; }
public int numberOfProperties() { ensureBlocksLoaded(); return blockRecordsCursor; }
@Override public Iterator<PropertyBlock> iterator() ensureBlocksLoaded(); return new Iterator<PropertyBlock>()
/** * Gets the sum of the sizes of the blocks in this record, in bytes. */ public int size() { ensureBlocksLoaded(); int result = 0; for ( int i = 0; i < blockRecordsCursor; i++ ) { result += blockRecords[i].getSize(); } return result; }
public PropertyBlock getPropertyBlock( int keyIndex ) { ensureBlocksLoaded(); for ( int i = 0; i < blockRecordsCursor; i++ ) { PropertyBlock block = blockRecords[i]; if ( block.getKeyIndexId() == keyIndex ) { return block; } } return null; }
public PropertyBlock removePropertyBlock( int keyIndex ) { ensureBlocksLoaded(); for ( int i = 0; i < blockRecordsCursor; i++ ) { if ( blockRecords[i].getKeyIndexId() == keyIndex ) { PropertyBlock block = blockRecords[i]; if ( --blockRecordsCursor > i ) { blockRecords[i] = blockRecords[blockRecordsCursor]; } return block; } } return null; }
public void addPropertyBlock( PropertyBlock block ) { ensureBlocksLoaded(); assert size() + block.getSize() <= PropertyType.getPayloadSize() : "Exceeded capacity of property record " + this + ". My current size is reported as " + size() + "The added block was " + block + " (note that size is " + block.getSize() + ")"; blockRecords[blockRecordsCursor++] = block; }