Created
July 12, 2011 20:52
-
-
Save robi42/1078959 to your computer and use it in GitHub Desktop.
Conveniently iterate over a java.util.HashSet in Ringo
This file contains hidden or 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
$ ringo | |
>> set = new java.util.HashSet(['foo', 'bar']) | |
[java.util.HashSet [foo, bar]] | |
>> for each (var element in Iterator(set)) print(element) | |
foo | |
bar | |
>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment