class StructureDB extends CompositeDB implements Structure {

	@Override
	public void deleteAtOffset(int offset) {
		lock.acquire();
		try {
			checkDeleted();
			if (offset < 0) {
				throw new IllegalArgumentException("Offset cannot be negative.");
			}
			if (offset >= structLength) {
				return;
			}
			int index =
				Collections.binarySearch(components, Integer.valueOf(offset), offsetComparator);

			int offsetDelta = 0;
			int ordinalDelta = 0;
			if (index < 0) {
				index = -index - 1;
				--ordinalDelta;
				offsetDelta = -1;
				shiftOffsets(index, ordinalDelta, offsetDelta);
			}
			else {
				index = advanceToLastComponentContainingOffset(index, offset);
				DataTypeComponentDB dtc = components.get(index);
				while (dtc.containsOffset(offset)) {
					doDelete(index);
					if (--index < 0) {
						break;
					}
					dtc = components.get(index);
				}
			}

			adjustInternalAlignment(true);
			notifySizeChanged();
		}
		finally {
			lock.release();
		}
	}

	public  StructureDB(DataTypeManagerDB dataMgr, DBObjectCache<DataTypeDB> cache,
			CompositeDBAdapter compositeAdapter, ComponentDBAdapter componentAdapter,
			Record record);

}