Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.util.SparseArray;

public class Main {
    public static int getSize(SparseArray<?> sparseArray) {
        if (sparseArray == null) {
            return 0;
        }
        return sparseArray.size();
    }

    @SuppressWarnings("unchecked")
    public static <T> int getSize(T... array) {
        if (array == null) {
            return 0;
        }
        return array.length;
    }
}