genericize print format; cast during hash code generation