Skip to content

Instantly share code, notes, and snippets.

@edipofederle
Last active August 29, 2015 13:57
Show Gist options
  • Save edipofederle/9817303 to your computer and use it in GitHub Desktop.
Save edipofederle/9817303 to your computer and use it in GitHub Desktop.
@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