Last active
August 29, 2015 13:57
-
-
Save edipofederle/9817303 to your computer and use it in GitHub Desktop.
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
@Test | |
public void rui(){ | |
//HashSet Global | |
//Poderia ser um HashTree caso você queira uma esturura de arvore | |
HashSet<Set<String>> hs = new HashSet<>(); | |
HashSet<String> dset0 = new HashSet<String>(); | |
dset0.add("String 1"); | |
HashSet<String> dset1 = new HashSet<String>(); | |
dset1.add("String 2"); | |
HashSet<String> dset2 = new HashSet<String>(); | |
dset2.add("String 3"); | |
HashSet<String> dset3 = new HashSet<String>(); | |
dset3.add("String 4"); | |
hs.add(dset0); | |
hs.add(dset1); | |
hs.add(dset2); | |
hs.add(dset3); | |
Iterator<Set<String>> iterator = hs.iterator(); | |
while (iterator.hasNext()) { | |
System.out.print(iterator.next() + " "); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment