Java List Remove remove(final List list, final T... objects)

Here you can find the source of remove(final List list, final T... objects)

Description

Removes the.

License

Open Source License

Parameter

Parameter Description
T the generic type
list the list
objects the objects

Return

the list

Declaration

public static <T> List<T> remove(final List<T> list, final T... objects) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2006-2010 eBay Inc. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *******************************************************************************/

import java.util.List;

public class Main {
    /**/*from w w  w .  ja  va2  s.c  o  m*/
     * Removes the.
     *
     * @param <T> the generic type
     * @param list the list
     * @param objects the objects
     * @return the list
     */
    public static <T> List<T> remove(final List<T> list, final T... objects) {
        for (final T object : objects)
            list.remove(object);
        return list;
    }
}

Related

  1. remove(Collection entityList1, Collection entityList2, Comparator comparator)
  2. remove(final List list, final int index, final T defaultValue)
  3. remove(List aList, Object anObj)
  4. remove(List models, int start, int count)
  5. remove(List list, List elements)
  6. remove(List list, Class type)