public void insertNode(int index, SinglyLinkedListNode<T> newNode) {
    // Check for out of bounds insertion.
    if (index > size) {
      return;
    }

    if (size == 0) {
      // Deal with special case of the first node.
      start = newNode;
    } else if (index == 0) {
      // Deal with special case of inserting at beginning of list.
      newNode.setNextNode(start);
    } else  {
      // General case of inserting with existing nodes.
      SinglyLinkedListNode<T> current = start;
      for (int i = 0; i < index - 1; i++) {
        current = current.getNextNode(); 
      }

      newNode.setNextNode(current.getNextNode());
      current.setNextNode(newNode);
    }

    // Reset start and end node, if necessary.
    if (index == size) {
      end = newNode;
    }
    if (index == 0) {
      start = newNode;
    }
    size++;
  }