Android Utililty Methods SparseBooleanArray Convert

List of utility methods to do SparseBooleanArray Convert

Description

The list of methods to do SparseBooleanArray Convert are organized into topic(s).

Method

MaptoMap(SparseBooleanArray array)
to Map
Map<Integer, Boolean> map = Maps.newHashMap();
for (int i = 0; i < array.size(); i++) {
    map.put(array.keyAt(i), array.valueAt(i));
return map;
SettoSet(SparseBooleanArray array)
to Set
Set<Integer> trueSet = Sets.newHashSet();
for (int i = 0; i < array.size(); i++) {
    if (array.valueAt(i)) {
        int position = array.keyAt(i);
        trueSet.add(position);
return trueSet;
...