List of usage examples for java.util Deque removeAll
boolean removeAll(Collection<?> c);
From source file:edu.byu.nlp.al.EmpiricalAnnotationInstanceManager.java
private void prioritizeMeasurements(Deque<FlatInstance<D, L>> measurementDeque, boolean prioritizeLabelProportions) { if (prioritizeLabelProportions) { // get a list of all the labeled proportion measurements ArrayList<FlatInstance<D, L>> proportions = Lists.newArrayList(); for (FlatInstance<D, L> inst : measurementDeque) { Measurement meas = inst.getMeasurement(); if (meas instanceof BasicClassificationLabelProportionMeasurement) { proportions.add(inst);/*from ww w .ja va2 s . c o m*/ } } // move them to the front of the line measurementDeque.removeAll(proportions); for (FlatInstance<D, L> prop : proportions) { measurementDeque.push(prop); } } }