Skip to content

Instantly share code, notes, and snippets.

@damianoporta
Created December 9, 2015 16:41
Show Gist options
  • Save damianoporta/04f00ef51f989d6f7243 to your computer and use it in GitHub Desktop.
Save damianoporta/04f00ef51f989d6f7243 to your computer and use it in GitHub Desktop.
List<Span> spanList = Arrays.asList(spans);
for (int i = 0; i < spanList.size(); i++) {
Span a = spanList.get(i);
for (int c = i + 1; c < spanList.size(); c++) {
Span b = spanList.get(c);
if (a.contains(b)) {
spanList.remove(c);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment