Here you can find the source of getCollectionSize(Collection collection)
Parameter | Description |
---|---|
collection | <code>java.util.Collection</code> |
public static int getCollectionSize(Collection collection)
//package com.java2s; /*//from w ww .j ava 2 s . c o m * File: $RCSfile$ * * Copyright (c) 2005 Wincor Nixdorf International GmbH, * Heinz-Nixdorf-Ring 1, 33106 Paderborn, Germany * All Rights Reserved. * * This software is the confidential and proprietary information * of Wincor Nixdorf ("Confidential Information"). You shall not * disclose such Confidential Information and shall use it only in * accordance with the terms of the license agreement you entered * into with Wincor Nixdorf. */ import java.util.Collection; public class Main { /** * return collection size * * @param collection <code>java.util.Collection</code> * @return size of collection */ public static int getCollectionSize(Collection collection) { return collection != null ? collection.size() : 0; } }