A type-safe map-like class