Code example for SparseArray

Methods: clear

0
	public ChannelsDataSource() { 
		channels = new SparseArray<Channel>();
	} 
 
	public synchronized void clear() { 
		channels.clear();
	} 
	 
	public synchronized Channel createChannel(int cid, int bid, String name, String topic_text, long topic_time, String topic_author, String type, long timestamp) {
		Channel c = getChannelForBuffer(bid);
		if(c == null) {
			c = new Channel();
			channels.put(bid, c);
		} 
		c.cid = cid;
		c.bid = bid;
		c.name = name;
		c.topic_author = topic_author;
		c.topic_text = topic_text;
		c.topic_time = topic_time;
		c.type = type;