is the size of Collection Between a range - Android java.util

Android examples for java.util:Collection Size

Description

is the size of Collection Between a range

Demo Code


//package com.java2s;

import java.util.Collection;

public class Main {
    public final static boolean isBetween(Collection c, int min, int max) {
        int s = size(c);
        return s > min && s < max;
    }/*from  w w w  .  ja  v  a2 s. c  om*/

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

Related Tutorials