Code example for ArrayList

Methods: add, contains

0
    public ArrayList<Group> getGroups() {
        return mGroups;
    } 
 
    public void addGroup(Group group) {
        if (!mGroups.contains(group)) {
            mGroups.add(group);
        } 
    } 
 
    /** 
     * Returns true if this phone number is selected for a multi-operation. 
     */ 
    public boolean isChecked() { 
        return mIsChecked;
    } 
 
    public void setChecked(boolean checked) {
        mIsChecked = checked;
    }