Code example for SparseArray

Methods: delete, put

0
				counter = 1;
			else 
				counter++;
 
			if(counter - MAX_MESSAGES_SAVED > 0)
				Lastmessages.delete(counter - MAX_MESSAGES_SAVED);
			if(author.equals(""))
				author = "Unknown";
			Lastmessages.put(counter, author + ": " + message);
 
			// Release all handler waiting a message 
			newMessageReceived.signalAll();
			lock.unlock();
			return true; 
		}else{ 
			AppLog.logWarningString("Null message"); 
			lock.unlock();
			return false; 
		}