@SuppressWarnings("unchecked")
	public <T extends Sprite> T[] getAllOf(Class<? extends T> clazz)
	{
		List<T> objs = JavaHelp.newArrayList();
		for (int i = 0; i < size(); i++)
		{
			Sprite s = get(i);
			if (s.getClass().isAssignableFrom(clazz))
			{
				objs.add(clazz.cast(s));
			}
		}
		return objs.toArray((T[]) Array.newInstance(clazz, 0));
	}