TelephoneTreeNode<T> isn't a T. You have 2 choices: change the return result to be a TelephoneTreeNode<T>.