Here you can find the source of subtractFromList(List> op1, Object op2)
Parameter | Description |
---|---|
op1 | a parameter |
op2 | a parameter |
@SuppressWarnings({ "unchecked", "rawtypes" }) private static Object subtractFromList(List<?> op1, Object op2)
//package com.java2s; /******************************************************************************* * This file is part of Pebble.//from w w w. j av a 2 s . c om * * Copyright (c) 2014 by Mitchell B?secke * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. ******************************************************************************/ import java.util.Collection; import java.util.List; public class Main { /** * This is not a documented feature but we are leaving this in for now. I'm * unsure if there is demand for this feature. * * @param op1 * @param op2 * @return */ @SuppressWarnings({ "unchecked", "rawtypes" }) private static Object subtractFromList(List<?> op1, Object op2) { if (op2 instanceof Collection) { op1.removeAll((Collection) op2); } else { op1.remove(op2); } return op1; } }