Here you can find the source of getCollectionSize(Collection> collection)
Parameter | Description |
---|---|
list | a parameter |
public static int getCollectionSize(Collection<?> collection)
//package com.java2s; /*//from ww w .jav a 2 s . c om Pulsar Copyright (C) 2013-2015 eBay Software Foundation Licensed under the GPL v2 license. See LICENSE for full terms. */ import java.util.Collection; public class Main { /** * Returns size of the incoming list * * @param list * @return */ public static int getCollectionSize(Collection<?> collection) { if (collection == null) return 0; else return collection.size(); } }