Created
June 30, 2020 02:07
-
-
Save sasssass/583ae762e16b15e71cc349d307acf27c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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