Beruflich Dokumente
Kultur Dokumente
html
List
ArrayList
LinkedList
Vector
Stack
Set
EnumSet
represents set of o
A specia
HashSet
This class implements the Set interface, backed by a hash table (actu
guarant
LinkedHashSet
SortedSet
TreeSet
interface
Map
HashMap
Hashtable
EnumMap
IdentityHashMap
LinkedHashMap
TreeMap
Hash
Hashtable does not allow null key
A specialize
This class implements the Map interface with a hash table, usin
IdentityHashMap, two keys k1 and k2 are considered equal if and onl
on
This implementation differs from Has
TreeMap also maps a key and a value. Furthermore it guar
SortedMap
Linked
PriorityQueue stores its elements internally according to their n
rdered list of objects, meaning you can access the elements of a List in a specific order, and by an index too
ends AbstractList and implements the List interface. ArrayList supports dynamic arrays that can grow as needed
erations that index into the list will traverse the list from the beginning or the end, whichever is closer to the spe
Vector, no other thread can get a hold of it.
n resized while Vector doubles the size of itself by default when grows.
ance as it is non-synchronized.
(LIFO)
ack
t
bject.
represents set of objects, meaning each element can only exists once in a Set
A specialized Set implementation for use with enum types
ked by a hash table (actually a HashMap instance). It makes no guarantees as to the iteration order of the set; i
guarantee that the order will remain constant over time.
able and Linked list implementation of the Set interface, with predictable iteration order.
nkedHashSet:This class provides all of the optional Set operations, and permits null elements.
ype of the java.util.SortedSet interface. It behaves like a SortedSet with the exception you have navigation met
rtedSet
the NavigableSet interface in the java.util package: java.util.TreeSet
orting
higher than, between
est,highest,smallest than, highest than
es
the exception that the elements are sorted internally. one implementation of the SortedSet interface - the java.
maps a key and a value. It does not guarantee any order of the elements stored internally in the map.
ce with a hash table, using reference-equality in place of object-equality when comparing keys (and values). In o
nsidered equal if and only if (k1==k2). (In normal Map implementations (like HashMap) two keys k1 and k2 are
only if (k1==null ? k2==null : k1.equals(k2)).)
entation differs from HashMap in that it maintains a doubly-linked list running through all of its entries.
alue. Furthermore it guarantees the order in which keys or values are iterated - which is the sort order of the ke
able-based Map implementation with weak keys. An entry in a WeakHashMap will automatically be removed by
when its key is no longer in use
ce is a subtype of the java.util.Map interface, with the addition that the elements stored in the map are sorted i
has one implementation of the SortedMap interface - the java.util.TreeMap class.
It has a few extensions to the SortedSet which makes it possible to navigate the map.
has one implementation of the NavigableMap interface: java.util.TreeMap
t() - returns a NavigableSet in which the order of the elements is reversed compared to the original key set.
descendingMap() - returns a NavigableMap which is a view of the original Map.
headMap(), tailMap() and subMap() - less than,higher than,between
ceiling(), floor(), higher(), and lower() - smallest,highest,smallest than, highest than
celingEntry(), floorEntry(), higherEntry(), lowerEntry() - returns Map.Entry
pollFirstEntry() and pollLastEntry() - returns and removes
d to have elements inserted at the end of the queue, and elements removed from the beginning of the queue
d to have elements inserted at the end of the queue, and elements removed from the beginning of the queue
LinkedList is a pretty standard deque / queue implementation.
n an array. If the number of elements exceeds the space in the array, a new array is allocated, and all elements
words, the ArrayDeque grows as needed, even if it stores its elements in an array.
in a Set
ration order.
mits null elements.
te the map.
eMap
fail-fast:If the collection (ArrayList, vector etc) gets structurally modified by any means, except the ad
iterator, after creation of iterator then the iterator will throw ConcurrentModificationException. Structu
the addition or deletion of elements from the collection.