Example usage for android.util LongSparseArray valueAt

List of usage examples for android.util LongSparseArray valueAt

Introduction

In this page you can find the example usage for android.util LongSparseArray valueAt.

Prototype

@SuppressWarnings("unchecked")
public E valueAt(int index) 

Source Link

Document

Given an index in the range 0...size()-1, returns the value from the indexth key-value mapping that this LongSparseArray stores.

Usage

From source file:net.sf.sprockets.util.SparseArrays.java

/**
 * Get the values of the LongSparseArray.
 *//*ww  w  .  j a va2  s.  com*/
public static <E> List<E> values(LongSparseArray<E> array) {
    int size = array.size();
    List<E> vals = new ArrayList<>(size);
    for (int i = 0; i < size; i++) {
        vals.add(array.valueAt(i));
    }
    return vals;
}