public void insert(T item, int afterIndex) {
		assert -1 <= afterIndex && afterIndex < length;

		if (afterIndex == -1) {

			if (front != null)
				front.previous = front;

			front = new DNode(item, null, front);

			if (back == null)
				back = front;

		} else {

			DNode previousNode = getNode(afterIndex);
			DNode nextNode = (previousNode != null) ? previousNode.next : null;
			DNode newNode = new DNode(item, previousNode, nextNode);

			if (previousNode == null)
				this.front = newNode;
			else
				previousNode.next = newNode;

			if (nextNode == null)
				this.back = newNode;
			else
				nextNode.previous = newNode;
		}

		length++;
	}