SUNDAY, JULY 11, 1965
Kevin

Everybody knows I really love Java, and I’m a real fan of the new(ish) generic type features in Java, but as I mentioned last time, I have some problems with the way they handle reflection. Well I have some other problems with Java as well, problems major enough to make me a little angry, but not big enough to make me even consider switching. This post will just outline some of the things I would like to see implemented in future Java implementations. Read more…
TUESDAY, JUNE 28, 1983
Kevin

My first experience with generics in Java was when I was working on my Darwin G.P. library. I was excited to find out about and take advantage of generics, but there was one major problem I had with the way they were implemented–they were completely disregarded at run-time! I never fully understood what the motivation behind that decision was, and I’ve been informed that C# does things differently (have not verified), but I recently discovered an interesting workaround using the Factory pattern. Read more…
WEDNESDAY, MAY 16, 1973
Kevin

The other day, I implemented a parameterised MultiMap in Java. In my project, however, I recently discovered that it would be nice to choose what data structures underlie the MultiMap, since you might have a preference for ordering, runtime, duplicates, etc. So I made some minor changes that make the MultiMap significantly more powerful. Read more…
FRIDAY, MARCH 10, 2023
Kevin

A MultiMap is essentially an augmented data structure for storing key-value pairs where one key can potentially be associated with any number of values. I’ve accomplished this in the past by using a Map<Key, List<Value>> or some variation in the past, but methods of access are inconvenient and can be a source of many bugs. Surprisingly, I’ve never gone out of my way to implement what should be a relatively simple data structure, but I finally did it for my most recent project, so I’m making it available to anyone who wants to use it. Read more…
WEDNESDAY, NOVEMBER 11, 1970
Kevin

In a recent Java project, I found myself needing to store several intervals of time which I could access readily and efficiently. I only needed to build the tree once, so a static data structure would work fine, but queries needed to be as efficient as possible. Read more…