PDF Java Collections Framework -state.edu
[Pages:61]Java Collections Framework
14 April 2021
OSU CSE
1
Overview
? The Java Collections Framework (JCF) is a group of interfaces and classes similar to the OSU CSE components
? The similarities will become clearly evident from examples
? See Java libraries package java.util
? There are some important differences, too, however, that deserve mention (at the end)
14 April 2021
OSU CSE
2
Overview of Interfaces
Iterable
Collection
Set
List
SortedSet
NavigableSet
14 April 2021
Queue Deque
OSU CSE
Map Sorted-
Map Navigable-
Map
3
Overview of Interfaces
Iterable
Collection
Map
Set
List
Queue
SortedMap
SortedSet
NavigableSet
14 April 2021
Note: MDaepqudeoes not extend Collection; but it is a "collection".
NavigableMap
OSU CSE
4
Overview of Interfaces
Iterable
Collection
Map
Set
List
Queue
SortedMap
SortedSet
NavigableSet
DIetqu(eebreacbaluseeisoifnitjsainNvtaaivmM.igaalapbtaelen- g connection to for-each loops), but Iterator is in java.util.
14 April 2021
OSU CSE
5
Overview of IntSeurbfsaeqcueentsslides
discuss only certain
Iterable
interfaces.
Collection
Set
List
SortedSet
NavigableSet
14 April 2021
Queue Deque
OSU CSE
Map Sorted-
Map Navigable-
Map
6
The Collection Interface
? Essentially a finite multiset of E ? No direct/efficient way to ask how many
"copies" of a given element there are ? Two interesting methods to create arrays of
the elements ? Many methods (including add, remove,
clear) are "optional"
14 April 2021
OSU CSE
7
The Set Interface
? Essentially a finite set of E
? No removeAny or similar method, so you must use iterator to iterate over a Set
? Recall (from Iterator): "The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress [except using Iterator.remove]."
? Many methods (including add, remove, clear) are "optional"
14 April 2021
OSU CSE
8
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- pdf standard template library and the java collections classes
- pdf learning computer programming using java with 101 examples
- pdf lambda expressions in java 8 part 1 basics
- pdf java current affairs 2018 apache commons collections
- pdf 15 department of computer science
- pdf java collections framework
- pdf java basics usf computer science
- pdf introduction to programming using java iit kanpur
- pdf java in a nutshell 6th edition covers java 8 r 5
- pdf photo credit andrew kennedy generics and the java
Related searches
- java collections tutorial with examples
- state of michigan collections e service
- state of michigan collections account number
- java full course pdf download
- java book pdf download
- pdf java programming
- java collections sort example
- java collections sort
- state of michigan collections eservice
- collections framework in java
- collections in java tutorial
- collections in java w3schools