Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //java style collections for ocaml?
- [Collection].retainAll -- (?)
- each collection needs to present its own iterator.
- //[] notation redundant ?
- to retrofit
- old structures: vector stack?
- LIST
- how many iterators in list: 2
- one : ListIterator
- two : Iterator (generic -- like a walkman)
- in implementation :
- just ListIterator needs to be present,
- but its perception depends on what we want.
- QUEUE
- head::tail structure //this is interesting : functional prog in java
- SET
- (hashSet, treeSet)
- no order
- why doesn't it have any new methods but its a separate interface anyway?
- 'cuz different semantics
- MAP (key, value)
- (hashMap, treeMap, sortedMap) //wasn't there another maptype that was sorted?
- 3 collections : keys, values, mappings
- why mappings and keys are sets? they need to be unique
- ITERATOR
- usually internal class for collection : tight binding, encap
- remember the for-loop //the alamo
- //does anyone know the word legible?
- UTILITIES
- Arrays Collections
- why are the sort etc. methods not implemented in the collections?
- 'cuz there are no intermediate classes, so all the implementation would have to be put into the leaves of the inheritance tree.
- //why not make the intermediate class then?
- [Collections].unmodifiable...(Collection c) - wrapper
- [Collections].checked...(Collection c) - wrapper
- [Collections].synchronized...(Collection c) - wrapper
- COMPARATOR & COMPARABLE
- {<0, =0, >0}: my object is {first, same, second}
- # ___ ___
- # ___ ___ _ | _| ___ ___ |_ |
- # \ \ / / | | | | | \/ | | |
- # \ \/ / | | | | | |\ /| | | |
- # \ / | | | | | | \/ | | | |
- # \__/ |_| | |_ |_| |_| _| |
- # |___| |___|
- GENERICS //parametric polymorphism
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement