25b-generics - CSE 143 Lecture 25 (b) Generic collections...

Info iconThis preview shows pages 1–5. 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 –P rob lem : • We should be able to treat both lists the same way in client code. 17 -3 42 value 2 1 0 index front 42 next data -3 next data
Background image of page 2
3 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. –De sc r ibe s whata collection does, not howit 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
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 An IntList
Background image of page 4
Image of page 5
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 - CSE 143 Lecture 25 (b) Generic collections...

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

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