Java: Collection
What is Collection
In Java, collection is a Interface for datatypes that's list-like. In other languages called {list, array, vector, tuple}.
The full name is java.util.Collection
Note: “collection” and Java: Map are different interfaces, but sometimes the word “collection” informally mean both.
Methods of Collection Interface
The collection interface has methods like the following.
addclearcontainsequalsisEmptyiterator
Children of Collection Interface
The Collection interface has the following children. Each of these interface is more specialized list-like type.
- java.util.Set
- java.util.SortedSet
- java.util.NavigableSet
- java.util.Queue
- java.util.concurrent.BlockingQueue
- java.util.concurrent.TransferQueue
- java.util.Deque
- java.util.concurrent.BlockingDeque
Implementations of Collection Interface
The following are classes that implements the collection interface.
- AbstractCollection
- AbstractList
- AbstractQueue
- AbstractSequentialList
- AbstractSet
- ArrayBlockingQueue
- ArrayDeque
- ArrayList
- AttributeList
- BeanContextServicesSupport
- BeanContextSupport
- ConcurrentHashMap.KeySetView
- ConcurrentLinkedDeque
- ConcurrentLinkedQueue
- ConcurrentSkipListSet
- CopyOnWriteArrayList
- CopyOnWriteArraySet
- DelayQueue
- EnumSet
- HashSet
- JobStateReasons
- LinkedBlockingDeque
- LinkedBlockingQueue
- LinkedHashSet
- LinkedList
- LinkedTransferQueue
- PriorityBlockingQueue
- PriorityQueue
- RoleList
- RoleUnresolvedList
- Stack
- SynchronousQueue
- TreeSet
- Vector