Code example for SparseArray

Methods: delete

0
		mBasicSongs.put(song.hashCode(), new BasicSong(song));
		return song.hashCode();
	} 
 
	private void removeSong(Song song) {
		mSongs.delete(song.hashCode());
	} 
 
	public Song getSong(int nowPlayingTag) {
		WeakSongReference toRemove = (WeakSongReference) mQueue.poll();
		while (toRemove != null) {
			mSongs.delete(toRemove.tag);
			toRemove = (WeakSongReference) mQueue.poll();
		} 
		WeakSongReference toReturn = mSongs.get(nowPlayingTag);
		if (toReturn != null) {
			Song referenced = mSongs.get(nowPlayingTag).get();
			if (referenced != null) {
				return referenced;
			}