- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
'Singular' collection type
Wed, 2009-05-27, 20:54
I've implemented a Singular collection type, for collections of zero or one elements. I've also included an immutable implementation of Singular (SOption) and two mutable implementations (SWeakReference and SSoftReference).
This is part of larger work I'm doing to port Google's CustomConcurrentHashMap to the new collections library. For this, it turns out it's useful to have Option, WeakReference, and SoftReference implement the same interface.
Feedback welcome.
--j
This is part of larger work I'm doing to port Google's CustomConcurrentHashMap to the new collections library. For this, it turns out it's useful to have Option, WeakReference, and SoftReference implement the same interface.
Feedback welcome.
--j