Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task04_Lyschev #105

Open
wants to merge 1 commit into
base: Lischev
Choose a base branch
from
Open

Conversation

LyschevIvan
Copy link

No description provided.

}

override fun next(): V {
if(!hasNext()){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

нужна более корректная ошибка
можно почитать, например, тут https://stackoverflow.com/questions/20252715/how-to-use-the-nosuchelementexception-in-iterator-next


inner class TreeIterator: Iterator<V> {
private val nodeList = makeNodeList()
private fun makeNodeList():LinkedList<Node>{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

если мы возвращем node, надо позаботиться о том, чтобы пользователь не имел доступа к внутренним данным - parent,left,right

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants