Skip to content

Instantly share code, notes, and snippets.

@anthonyvdotbe
Created May 13, 2021 18:19
Show Gist options
  • Save anthonyvdotbe/e2e313693f032e4336e5385334a476db to your computer and use it in GitHub Desktop.
Save anthonyvdotbe/e2e313693f032e4336e5385334a476db to your computer and use it in GitHub Desktop.
Collections API
|- Collection ---------------------------------------------------------------------------------------------------------------|
|unordered ordered sorted distinct distinct & ordered distinct & sorted |
| Set |
| Queue = (get|remove)First + addLast PriorityQueue |
| Stack = (add|get|remove)Last |
| Deque = Queue + Stack + addFirst LinkedHashSet SortedSet |
| List = Deque + (add|get|remove)Indexed List::sort NavigableSet |
|----------------------------------------------------------------------------------------------------------------------------|
|- Collection ---------------------------------------------------------------------------------------------------------------|
|unordered ordered sorted distinct distinct & ordered distinct & sorted |
| Set |
| Queue = (get|remove)First + addLast PriorityQueue |
| Stack = (add|get|remove)Last |
| |- ReversibleCollection -----------------------------------| |- ReversibleSet -----------------------||
| |Deque = Queue + Stack + addFirst | |LinkedHashSet SortedSet ||
| |List = Deque + (add|get|remove)Indexed List::sort | | NavigableSet ||
| |----------------------------------------------------------| |---------------------------------------||
|----------------------------------------------------------------------------------------------------------------------------|
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment