Java Collection Size size(Collection values)

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

Description

size

License

Open Source License

Declaration

public static <E> int size(Collection<E> values) 

Method Source Code

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

import java.util.Collection;

import java.util.Map;

public class Main {
    public static <E> int size(Collection<E> values) {
        int result = 0;
        if (values != null) {
            result = values.size();/*from www  .j  a  v a2s .c om*/
        }
        return result;
    }

    public static <K, V> int size(Map<K, V> values) {
        int result = 0;
        if (values != null) {
            result = values.size();
        }
        return result;
    }
}

Related

  1. size(Collection c)
  2. size(Collection c)
  3. size(Collection col)
  4. size(Collection coll)
  5. size(Collection collection)
  6. size(Collection v)
  7. size(final Collection collection)
  8. size(final Collection collection)
  9. size(final Collection items)