Code example for HashMap

Methods: get, put

0
	// =========================================================== 
	// Methods 
	// =========================================================== 
 
	public int preloadEffect(final String pPath) {
		Integer soundID = this.mPathSoundIDMap.get(pPath);
 
		if (soundID == null) {
			soundID = this.createSoundIDFromAsset(pPath);
			// save value just in case if file is really loaded 
			if (soundID != Cocos2dxSound.INVALID_SOUND_ID) {
				this.mPathSoundIDMap.put(pPath, soundID);
			} 
		} 
 
		return soundID;
	} 
 
	public void unloadEffect(final String pPath) {
		// stop effects 
		final ArrayList<Integer> streamIDs = this.mPathStreamIDsMap.get(pPath);