From c0fbdf37e0773f1635edc908e39ebe43b7432e3a Mon Sep 17 00:00:00 2001 From: Xevion Date: Wed, 26 Feb 2020 18:03:01 -0600 Subject: [PATCH] move datastructures into collections for organization --- study/collections.MD | 83 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 study/collections.MD diff --git a/study/collections.MD b/study/collections.MD new file mode 100644 index 0000000..eba2c3f --- /dev/null +++ b/study/collections.MD @@ -0,0 +1,83 @@ +### Common Java Data Structures Summary + +Java contains many object based data structures that you can import, some used more than others (ArrayList, for example). + +Not all of them work in familiar ways, and their methods can be confusing without proper usage, study, and a quick explanation over how they're used. + +#### Interfaces +##### Collection + +Common Implementing SubInterfaces: +* Deque +* List +* Queue +* Set +* SortedSet + +Common Implementing Classes: +* ArrayList +* ArrayDeque +* EnumSet +* HashSet +* LinkedList +* PriorityQueue +* Stack +* TreeSet + +##### Iterable + +Common Implementing SubInterfaces +* Collection +* Deque +* List +* Queue +* Set +* SortedSet + +Common Implementing Classes: +* ArrayDeque +* ArrayList +* EnumSet +* HashSet +* LinkedList +* PriorityQueue +* Stack +* TreeSet + +##### List + +Super Interfaces: +* Collection +* Iterable + +Implementing Classes: +* ArrayList +* LinkedList +* Stack + +A unordered collection (also known as a *sequence*) that allows precise control over where each element is inserted in a list. + +Users have methods allowing all of the following to methods: +* 4 methods providing positional index-based access to list elements. +* 1 method for accessing a special iterator, `ListIterator` allowing element insertion and replacement starting from a specified position. +* 2 methods for searching for a specified object. Usually *costly* linear searches. +* 2 methods for efficiently inserting and removing *multiple* elements at an arbitrary point. + +##### Set +##### Queue +##### Deque +##### SortedSet +##### Map +##### SortedMap +##### NavigableMap + +#### Classes +##### ArrayList +##### LinkedList +##### Stack +##### PriorityQueue +##### TreeSet +##### ArrayDeque +##### EnumSet +##### HashSet +##### HashMap \ No newline at end of file