Mind map
List ADT
Map content
List ADT
Index-based methods
- size()
- isEmpty()
- get(i)
- set(i,e)
- add(i,e)
- remove(i)
ArrayList: unbounded list
- dynamic array: abstraction to allow user to add elements to the list with the ArrayList class
Positional Lists
- getElement(): Returns the element stored at this position
- accessor methods
- first()
- last()
- before(p)
- after(p)
- isEmpty()
- size()
- update methods
- addFirst(e)
- addLast()
- addBefore(p,e)
- addAfter(p,e)
- set(p,e)
- remove(p)
Iterators
- software design pattern that abstracts the process of scanning through a sequence of elements, one element at a time.
- java.util.Iterador
- hasNext()
- next()
- remove()
- java.util.ListIterator
- add(e)
- hasNext()
- hasPrevious()
- previous()
- next()
- nextIndex()
- previousIndex()
- remove()
- set(e)
- java.util.Iterador
- software design pattern that abstracts the process of scanning through a sequence of elements, one element at a time.
Convert List into Array
- toArray()
- toArray(A)
Convert Array into List
- asList(A)
Information
- Description
- Mind Map on List ADT, created by Angelica Cordero on 16/05/2022.
- Created by
- Angelica Cordero
- Views
- 1
- Rating