HardKey<K> (@NotNull Object o) { //noinspection unchecked K key = (K)o; //noinspection unchecked HardKey<K> hardKey = (HardKey<K>)HARD_KEY.get(); hardKey.setKey(key, myHashingStrategy.hashCode(key)); return hardKey; }