@SuppressWarnings("unchecked")
	protected <C extends Component> C get(Entity entity,
			Class<? extends Component> componentClass) {
		int entityId = entity.getId();
		int componentId = getId(componentClass);
		Bag<Component> components = componentIdToComponents.get(componentId);
		if (components == null) {
			throw new NoSuchComponentException(String.format(
					ExceptionStrings.NO_SUCH_COMPONENT_EXISTS,
					componentClass.getSimpleName()));
		}

		Component component = components.get(entityId);
		if (component == null) {
			throw new NoSuchComponentException(
					ExceptionStrings.NO_SUCH_COMPONENT_EXISTS_IN_ENTITY);
		}

		return (C) component;
	}