Java Code Examples for org.apache.commons.collections4.IterableUtils#isEmpty()
The following examples show how to use
org.apache.commons.collections4.IterableUtils#isEmpty() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FcgProvider.java From ghidra with Apache License 2.0 | 5 votes |
private void expand(Iterable<FcgVertex> sources, FcgLevel sourceLevel, FcgDirection direction) { // remove any non-expandable vertices sources = IterableUtils.filteredIterable(sources, v -> v.canExpand()); if (IterableUtils.isEmpty(sources)) { return; } FcgLevel expandingLevel = sourceLevel.child(direction); Set<FcgEdge> newEdges = getModelEdges(sources, expandingLevel, edgeNotInGraphFilter); // Need all vertices from the source level, as well as their edges. // This is used to correctly layout the vertices we are adding. This way, if we // later add the sibling vertices, they will be in the correct spot, without clipping. Iterable<FcgVertex> sourceSiblings = getVerticesByLevel(sourceLevel); Set<FcgEdge> parentLevelEdges = getModelEdges(sourceSiblings, expandingLevel, unfiltered); Set<FcgVertex> newVertices = toVertices(newEdges, direction, vertexInGraphFilter.negate()); boolean isIncoming = direction == IN; FcgExpandingVertexCollection collection = new FcgExpandingVertexCollection(sources, sourceLevel, expandingLevel, newVertices, newEdges, parentLevelEdges, isIncoming, view.getPrimaryGraphViewer()); doExpand(collection); markExpanded(sources, direction, true); }
Example 2
Source File: DefaultVisualGraph.java From ghidra with Apache License 2.0 | 4 votes |
protected void fireEdgesRemoved(Iterable<E> removed) { if (IterableUtils.isEmpty(removed)) { return; } changeListeners.forEach(l -> l.edgesRemoved(removed)); }
Example 3
Source File: DefaultVisualGraph.java From ghidra with Apache License 2.0 | 4 votes |
protected void fireEdgesAdded(Iterable<E> added) { if (IterableUtils.isEmpty(added)) { return; } changeListeners.forEach(l -> l.edgesAdded(added)); }