public ArrayList<Entity> entityList(Class c)
	{
		ArrayList<Entity> allEntities=new ArrayList<Entity>();
		if(entitiesByDepth==null)
			return(allEntities);
		for(Integer key:entitiesByDepth.keySet())
		{
			ArrayList<Entity> entities=entitiesByDepth.get(key);
			for(Entity entity:entities)
			{
				//if(entity.getClass().getName()==c.getName())
				//if(entity.getClass().isAssignableFrom(c))
				if(c.isAssignableFrom(entity.getClass()))
					allEntities.add(entity);
			}
		}
		return(allEntities);
	}