public <L extends Layer> Collection<L> layers(Class<L> cl) {
		checkerr();
		Collection<L> ret = new LinkedList<L>();
		for (Layer l : layers) {
			if (cl.isInstance(l))
				ret.add(cl.cast(l));
		}
		return (ret);
	}