`private static`? This looks like a good one for a util class, though. In fact, is there really nothing like is in Guava..?