ListIterator Presented by: David Leblanc. Information Iterate over collection without showing its internal structure ListIterator is a subinterface of.

Slides:



Advertisements
Similar presentations
Lists and the Collection Interface Chapter 4. Chapter Objectives To become familiar with the List interface To understand how to write an array-based.
Advertisements

ITEC200 Week04 Lists and the Collection Interface.
JAVA Programming (Session 7) When you are willing to make sacrifices for a great cause, you will never be alone. Instructor:
Introduction to Arrays Chapter What is an array? An array is an ordered collection that stores many elements of the same type within one variable.
COMP 121 Week 11: Linked Lists. Objectives Understand how single-, double-, and circular-linked list data structures are implemented Understand the LinkedList.
By Brandon Sheppard. Use of Iterator  Sequentially move through a collection  Can be very convenient  Phonebook example: Phone number listings stored.
© 2006 Pearson Addison-Wesley. All rights reserved9 A-1 Chapter 9 Advanced Java Topics.
On Some Characteristics of the New Generation Computers Oleg N. Granichin Sergey S. Sysoev
© 2006 Pearson Addison-Wesley. All rights reserved16-1 Iterators An iterator is an object that is used with a collection to provide sequential access to.
Iterators T.J. Niglio Computer & Systems Engineering Fall 2003 Software Design & Documentation Object Behavioral.
Risk Analysis- 1 MIS Practicum Risk Analysis Based on E.M. Bennatan, On Time, Within Budget. John Wiley & Sons, 1995.
Iterators Chapter 8 Slides by Steve Armstrong LeTourneau University Longview, TX  2007,  Prentice Hall.
Lists and the Collection Interface Chapter 4. Chapter 4: Lists and the Collection Interface2 Chapter Objectives To become familiar with the List interface.
Iterators in Java. Lecture Objectives To understand the concepts of Java iterators To understand the differences between the Iterator and ListIterator.
Fall 2007CS 2251 Lists and the Collection Interface Chapter 4.
Nested Loops. Nesting Control Structures One if statement inside another one An if statement inside a loop A loop inside an if statement Control structures.
1 Object-Oriented Software Engineering CIS 375 Bruce R. Maxim UM-Dearborn.
Linked Lists. RHS – SOC 2 Linked lists We can already store collec- tions of objects in arrays and array lists – why would we need other data structures…?
Inheritance and Class Hierarchies Ellen Walker CPSC 201 Data Structures Hiram College.
CSS446 Spring 2014 Nan Wang.  Java Collection Framework ◦ Set ◦ Map 2.
DEFINITION Quality assurance is the process of verifying or determining whether the products or services meet or exceed the customers expectations. Quality.
Lists and the Collection Interface Review inheritance & collections.
CSS446 Spring 2014 Nan Wang  Java Collection Framework ◦ LinkedList ◦ Set ◦ Map 2.
Computer Science 209 The Factory Pattern. Collections and Iterators List list1 = new ArrayList (); List list2 = new LinkedList (); Set set1 = new HashSet.
Java Coding OOP_3 David Davenport Computer Eng. Dept., Bilkent University Ankara - Turkey. Some important Java interfaces +
Comp 249 Programming Methodology Chapter 15 Linked Data Structure – Part A Dr. Aiman Hanna Department of Computer Science & Software Engineering Concordia.
COMP 121 Week 11: Linked Lists.
1 CMPSCI 187 Computer Science 187 Introduction to Introduction to Programming with Data Structures Lecture 8 Lists, Iterators, and Doubly Linked Lists.
Computer Science 209 Software Development Inheritance and Composition.
5. What did you do in order to find an answer to your question? 8.Why is the new information important for you? 7. What new information did you learn?
Basic Concepts of OOP.  Object-Oriented Programming (OOP) is a type of programming added to php5 that makes building complex, modular and reusable web.
Week 4 - Wednesday.  What did we talk about last time?  Started linked lists.
Behavioural Patterns GoF pg Iterator GoF pg. 257 – 271 Memento GoF pg By: Dan Sibbernsen.
CS 46B: Introduction to Data Structures July 21 Class Meeting Department of Computer Science San Jose State University Summer 2015 Instructor: Ron Mak.
1 Lecture 11 b Searching b Linear Search b Binary Search recursiverecursive iterativeiterative polymorphicpolymorphic.
Mission Vision Principles. Discussion Opportunities Areas of Collaboration Capabilities Required.
Iterators. Iterator  An iterator is any object that allows one to step through each element in a list (or, more generally, some collection).
Object Based Programming Chapter 8. 2 Contrast ____________________ Languages –Action oriented –Concentrate on writing ________________ –Data supports.
LSSU Assessment Timeline Phase I (Completed by December 2009) –Create Institutional Assessment Structure –Create Department Assessment Teams –Write College.
Lists and the Collection Interface Chapter 4. Chapter 4: Lists and the Collection Interface2 Chapter Objectives To become familiar with the List interface.
Chapter 5: Enhancing Classes
36 x 2 = ? A) 36 B) 72 C) 48 D) 76.
Week 4 - Friday CS221.
GoF Patterns (GoF) popo.
By SmartBoard team Adapter pattern.
University of Central Florida COP 3330 Object Oriented Programming
Software Development Inheritance and Composition
Conflict Notes.
Advanced Programming Behnam Hatami Fall 2017.
Repeating Instructions And Advance collection
Communication Diagrams
Arrays versus ArrayList
Copyright ©2012 by Pearson Education, Inc. All rights reserved
"First things first, but not necessarily in that order." -Dr. Who
Iterators (partial) Chapter 8 Slides by Nadia Al-Ghreimil
EDIT User Group - services
Interator and Iterable
"First things first, but not necessarily in that order " -Dr. Who
Josephus.
Registry Design Pattern
Alternative energy: changing electricity to heat.
Comp 249 Programming Methodology
Using Conversion Factors.
Insert Skill Perform Insert simple and clear instructions or cues
Circular Motion Chapter
Type Topic in here! Created by Educational Technology Network
Iterators Dan Fleck.
Object Encapsulation CSC 422 Dr. Spiegel.
The Object Paradigm Classes – Templates for creating objects
Iterator Design Pattern Jim Fawcett CSE776 – Design Patterns Fall 2014
Presentation transcript:

ListIterator Presented by: David Leblanc

Information Iterate over collection without showing its internal structure ListIterator is a subinterface of iterator ListIterator normally support polymorphic iteration, that is it can iterate over any kind of collection

Internal ListIterator Easier to implement Only 1 iterator can exist at a time Created as an inner class in collection class

External ListIterator Harder to implement Can have as many iterators as desired Every iterator keeps track of its own state Created as an outside class

Example Internal ListIterator

Example External ListIterator