@Override
	public void insertSorted(Comparable _value, boolean _ascending)
			throws ValueException {
		DLNode current = this.head;

		if (head == null) {
			DLNode insertNode = new DLNode(_value);
			head = insertNode;
			tail = head;
		} else {
			if (!isComparable(head.getVal(), _value)) {
				throw new ValueException(
						"The value you want to insert is not the same Type as the head value.");
			}
			if (_ascending) {

				while (current != null
						&& current.getVal().compareTo(_value) < 0) {
					current = current.getNext();

				}

			} else {
				while (current != null
						&& current.getVal().compareTo(_value) > 0) {
					current = current.getNext();

				}
			}
			if (current == null) {
				this.pushBack(_value);
			} else {
				DLNode prev = current.getPrev();
				DLNode insertNode = new DLNode(_value);

				if (prev == null) {
					this.pushFront(_value);
				} else {
					prev.setNext(insertNode);
					insertNode.setPrev(prev);
					insertNode.setNext(current);
					current.setPrev(insertNode);
				}
			}
		}
	}