package org.joow.elevator2;

import com.google.common.base.Optional;
import com.google.common.base.Predicate;
import com.google.common.collect.Collections2;

import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

public class Actions {
    public final List<Action> actions = new CopyOnWriteArrayList<>();

    public void add(final Action action) {
        actions.add(action);
    }

    public void remove(final Action action) {
        actions.removeAll(Collections2.filter(actions, new Predicate<Action>() {
            @Override
            public boolean apply(final Action input) {
                return input.floor() == action.floor();
            }
        }));
    }

    public void clear() {
        actions.clear();
    }

    public Optional<Action> next(final Cabin cabin) {
        if (actions.isEmpty()) {
            return Optional.absent();
        } else {
            return Optional.of(Paths.getBestPath(actions, cabin).first());
        }
    }
}

@@ -253,21 +253,22 @@
  %7B%0A    p
-ublic
+rivate
  final L
@@ -504,16 +504,21 @@
 ns, new 
+Floor
 Predicat
@@ -522,177 +522,24 @@
 cate
-%3CAction%3E() %7B%0A            @Override%0A            public boolean apply(final Action input) %7B%0A                return input.floor() == action.floor();%0A            %7D%0A        %7D
+(action.floor())
 ));%0A

Use FloorPredicate class to remove actions at given floor.