- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Need help cleaning up this code
Tue, 2012-02-21, 00:03
Hi Everyone,
I would like to know how I can clean up this code to make it more Scala like.
https://gist.github.com/1872104
Mainly I would like to see if it's possible to get rid of "val primitiveType: Class[P], val valueType: Class[V]" and use Manifest. Manifests are still a bit confusing concept for me.
The point of this class is to convert a non-primitive value (i.e. TimeZone) to a primitive value (String) and back. This way I can serialize an object into a Map and back with full control.
Thanks,
Drew
I would like to know how I can clean up this code to make it more Scala like.
https://gist.github.com/1872104
Mainly I would like to see if it's possible to get rid of "val primitiveType: Class[P], val valueType: Class[V]" and use Manifest. Manifests are still a bit confusing concept for me.
The point of this class is to convert a non-primitive value (i.e. TimeZone) to a primitive value (String) and back. This way I can serialize an object into a Map and back with full control.
Thanks,
Drew