25b-generics - CSE143 Lecture25(b) Genericcollections

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE 143 Lecture 25 (b) Generic collections  read 11.1, 15.3-15.4, 16.4-16.5 slides created by Marty Stepp http://www.cs.washington.edu/143/
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Our list classes We implemented the following two list classes: ArrayIntList LinkedIntList Problem: We should be able to treat both lists the same way in client code. inde x 0 1 2 valu e 4 2 -3 1 7 front data next 42 data next -3 data next 17
Background image of page 2
Recall: ADT interfaces  (11.1) abstract data type (ADT) : A specification of a collection of  data and the operations that can be performed on it. Describes  what  a collection does, not  how  it does it. Java's collection framework describes ADTs with interfaces: Collection Deque List Map Queue Set SortedMap An ADT can be implemented in multiple ways by classes: ArrayList  and  LinkedList implement  List HashSet  and  TreeSet implement  Set LinkedList  ,  ArrayDeque , etc. implement 
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/04/2011 for the course CSE 143 taught by Professor Sr during the Spring '08 term at University of Washington.

Page1 / 12

25b-generics - CSE143 Lecture25(b) Genericcollections

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online