Example usage for android.util SparseLongArray get

List of usage examples for android.util SparseLongArray get

Introduction

In this page you can find the example usage for android.util SparseLongArray get.

Prototype

public long get(int key) 

Source Link

Document

Gets the long mapped from the specified key, or 0 if no such mapping has been made.

Usage

From source file:android.databinding.ViewDataBinding.java

/** @hide */
@TargetApi(VERSION_CODES.JELLY_BEAN_MR2)
protected static long getFromList(SparseLongArray list, int index) {
    if (list == null || index < 0) {
        return 0;
    }/*from   w w  w  .jav  a  2  s  .  co m*/
    return list.get(index);
}