Code example for SparseBooleanArray

0
import android.util.SparseBooleanArray; 
 
public class ItemPositionsObservable extends 
	ObservableCollection<Boolean>{
	 
	private SparseBooleanArray arr = new SparseBooleanArray();
 
	public Boolean getItem(int position) {
		return arr.valueAt(position);
	} 
 
	public void onLoad(int position) {
	} 
 
	public Class<Boolean> getComponentType() {
		return Boolean.class;
	} 
 
	public int size() { 
		return arr.size();