Skip to content

Instantly share code, notes, and snippets.

@sasssass
Created June 30, 2020 02:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sasssass/583ae762e16b15e71cc349d307acf27c to your computer and use it in GitHub Desktop.
Save sasssass/583ae762e16b15e71cc349d307acf27c to your computer and use it in GitHub Desktop.
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