instead of using T here and casting you can probably use TIntByteHashMap