is Collection Size Not Larger Than - Android java.util

Android examples for java.util:Collection Size

Description

is Collection Size Not Larger Than

Demo Code


//package com.java2s;

import java.util.Collection;

public class Main {
    public final static boolean isNotLargerThan(Collection c, int mount) {
        return size(c) <= mount;
    }/*from   w ww  .  j a va  2  s  . co m*/

    public final static int size(Collection c) {
        return c == null ? 0 : c.size();
    }
}

Related Tutorials