Java linked list with an interface