1/18
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
collection
Root interface for most collections
Stores groups of objects
Parent of List, Set, and Queue
Does NOT include Maps
list
Interface
Ordered collection
Allows duplicates
Access by index
Implementations
ArrayList
LinkedList
Vector
set
Interface
No duplicate elements
No index
Implementations
HashSet
LinkedHashSet
TreeSet
queue
Interface
FIFO (First In First Out)
Implementations
LinkedList
PriorityQueue
map
Interface
Stores key-value pairs
Keys must be unique
NOT part of the Collection interface
Implementations
HashMap
LinkedHashMap
TreeMap
arraylist
Class
Implements List
keeps elemements in order you added
Allows duplicates
Fast random access
Slower insert/remove
linkedlist
Class
Implements List and Queue
Ordered
Allows duplicates
Fast insertion/removal
Slower random access
vector
Class
Like ArrayList
Thread-safe (synchronized)
Usually slower than ArrayList
stack
Class
Extends Vector
LIFO
Methods
push()
pop()
peek()
hashset
Class
Implements Set
No duplicates
No ordering
Fast
linkedhashset
Class
Implements Set
No duplicates
Keeps insertion order
treeset
Class
Implements NavigableSet (which extends SortedSet and Set)
No duplicates
Automatically sorted
hashmap
Class
Implements Map
Key-value pairs
Keys unique
No ordering
linkedhashmap
Class
Implements Map
Keeps insertion order
treemap
Class
Implements NavigableMap (which extends SortedMap and Map)
Keys automatically sorted
comparable
Interface
Defines natural ordering
Uses compareTo()
comes with the class (default order)
comparator
Interface
Defines custom ordering
Uses compare()
compare differently (custom order)
iterator
Used to move through collections.
methods
hasNext()
next()
remove()
collectioons
Utility class with static methods
sort()
shuffle()
reverse()
binarySearch()
max()
min()