Java Collection Size size(Collection c)

Here you can find the source of size(Collection c)

Description

size

License

Open Source License

Parameter

Parameter Description
c a parameter

Return

size of if c is not null , 0 otherwise

Declaration

public static int size(Collection<?> c) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Collection;

public class Main {
    /**/*w w w . j ava  2 s .  c om*/
     * @param c
     * @return size of {@link c} if c is not {@code null}, 0 otherwise
     */
    public static int size(Collection<?> c) {
        return c != null ? c.size() : 0;
    }
}

Related

  1. size(Collection collection)
  2. size(Collection collection)
  3. size(Collection... collections)
  4. size(Collection collection)
  5. size(Collection c)
  6. size(Collection col)
  7. size(Collection coll)
  8. size(Collection collection)
  9. size(Collection values)