remove item from Collection - Android java.util

Android examples for java.util:Collection

Description

remove item from Collection

Demo Code


import java.util.Collection;
import java.util.List;
import java.util.Map;

public class Main{
    //from   ww w .  ja  v a2s  . c o m
    public static boolean remove(Collection collection, int number) {
        if (number < 0 || EmptyUtils.isEmpty(collection)
                || collection.size() < number)
            return false;
        collection.remove(number);
        return true;
    }
}

Related Tutorials