Skip to content

Instantly share code, notes, and snippets.

@sasssass sasssass/Demo.kt
Created Jun 30, 2020

Embed
What would you like to do?
class Demo {
fun doSth(){
val array = arrayOf(0,0,0,0,0,0,0)
val collection : Collection = TreeCollection(array)
(collection as TreeCollection).addToTree(1)
(collection as TreeCollection).addToTree(2)
(collection as TreeCollection).addToTree(3)
(collection as TreeCollection).addToTree(4)
(collection as TreeCollection).addToTree(5)
(collection as TreeCollection).addToTree(6)
(collection as TreeCollection).addToTree(7)
val iterator = collection.createIterator()
while (iterator.hasNext())
iterator.next()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.