@Override public boolean removeIf(Predicate<? super Action<?, ?>> filter) { return list.removeIf(filter); }
@Override public boolean removeIf(Predicate<? super Action<?, ?>> filter) { return list.removeIf(filter); }
public void cleanupWeak() { items.removeIf(i -> i.get() == null); }
void unregister(Window window) { if (activeWindow == window) { activeWindow = null; } windowStack.removeIf(w -> w == window); activateLast(); }
public static LinkedList<Vertex5> simplifyModel(LinkedList<Vertex5> in) { LinkedList<Face> faces = new LinkedList<>(); Iterator<Vertex5> iter = in.iterator(); while (iter.hasNext()) { Face f = Face.loadFromIterator(iter); faces.removeIf(f::attemptToCombine); faces.add(f); } LinkedList<Vertex5> out = new LinkedList<>(); for (Face f : faces) { Collections.addAll(out, f.verts); } return out; }
private void clearPriorCurrentMinuteBin(long cutoffMillis) { if (perThreadHistogramBins == null) { // will happen if WavefrontHistogram.super() constructor will be invoked // before WavefrontHistogram object is fully instantiated, // which will be invoke clear() method return; } for (LinkedList<MinuteBin> bins : perThreadHistogramBins.values()) { // getCurrent() method will add (PRODUCER) item to the bins list, so synchronize the access synchronized (bins) { bins.removeIf(minuteBin -> minuteBin.getMinMillis() < cutoffMillis); } } }
private void clearPriorCurrentMinuteBin(long cutoffMillis) { if (perThreadHistogramBins == null) { // will happen if WavefrontHistogram.super() constructor will be invoked // before WavefrontHistogram object is fully instantiated, // which will be invoke clear() method return; } for (LinkedList<MinuteBin> bins : perThreadHistogramBins.values()) { // getCurrent() method will add (PRODUCER) item to the bins list, so synchronize the access synchronized (bins) { bins.removeIf(minuteBin -> minuteBin.getMinMillis() < cutoffMillis); } } }
/** * Split the path as a string to a list of strings to map to the path directives of akka http * @see <a href="https://doc.akka.io/docs/akka-http/current/routing-dsl/directives/path-directives/index.html">Akka Http Documentation</a> */ protected static void addPathMatcher(CodegenOperation codegenOperation) { LinkedList<String> allPaths = new LinkedList<>(Arrays.asList(codegenOperation.path.split("/"))); allPaths.removeIf(""::equals); LinkedList<TextOrMatcher> paths = replacePathsWithMatchers(allPaths, codegenOperation); codegenOperation.getVendorExtensions().put(PATHS, paths); }
public void mergeAction( @Nonnull final ChannelAction action ) { /* * If we have an unfiltered inverse action in actions list then we can remove * that action and avoid adding this action. This avoids scenario where there * are multiple actions for the same address in ChangeSet. */ if ( ChannelAction.Action.ADD == action.getAction() ) { if ( _channelActions.removeIf( a -> ChannelAction.Action.REMOVE == a.getAction() && a.getAddress().equals( action.getAddress() ) && null == action.getFilter() ) ) { return; } } else if ( ChannelAction.Action.REMOVE == action.getAction() ) { if ( _channelActions.removeIf( a -> ChannelAction.Action.ADD == a.getAction() && a.getAddress().equals( action.getAddress() ) && null == a.getFilter() ) ) { return; } } _channelActions.add( action ); }