Java Utililty Methods List Subtract

List of utility methods to do List Subtract

Description

The list of methods to do List Subtract are organized into topic(s).

Method

ListsubtractFloatLists(List listA, List listB)
Subtract float lists.
if (isEmpty(listA) && !isEmpty(listB)) {
    return listB;
if (!isEmpty(listA) && isEmpty(listB)) {
    return listA;
if (isEmpty(listA) && isEmpty(listB)) {
    return new ArrayList<Float>();
...
ObjectsubtractFromList(List op1, Object op2)
This is not a documented feature but we are leaving this in for now.
if (op2 instanceof Collection) {
    op1.removeAll((Collection) op2);
} else {
    op1.remove(op2);
return op1;
voidsubtractQ(LinkedList Q, List P)
subtract Q
Iterator<Float> it = P.iterator();
float p = 0;
LinkedList<Float> temp = new LinkedList<Float>();
for (float q : Q) {
    if (it.hasNext()) {
        p = it.next();
    temp.addLast(q - p);
...