public void using(Gun gun) { if (guns == null) { guns = new HashMap<GunType, Gun>(); } if (guns.get(gun.type()) != null) { guns.get(gun.type()).updateFrequency(); } else { gun.updateFrequency(); guns.put(gun.type(), gun); } }