@Override
	public <T> T[] toArray(T[] a) {

		if (a.length < size)
			a = (T[]) java.lang.reflect.Array.newInstance(a.getClass().getComponentType(), size);
		
		int i = 0;
		
		Object[] result = a;
		
		for (Link<E> e = head.getNext(); e != head; e = e.getNext())
			result[i++] = e.getData();

		if (a.length > size)
			a[size] = null;

		
		return a;
	}