MCPcopy Index your code
hub / github.com/antlr/codebuff / filter

Method filter

output/java_guava/1.4.18/Sets.java:863–875  ·  view source on GitHub ↗
(Set<E> unfiltered, Predicate<? super E> predicate)

Source from the content-addressed store, hash-verified

861
862
863 public static <E> Set<E> filter(Set<E> unfiltered, Predicate<? super E> predicate) {
864 if (unfiltered instanceof SortedSet) {
865 return filter((SortedSet<E>) unfiltered, predicate);
866 }
867 if (unfiltered instanceof FilteredSet) {
868 // Support clear(), removeAll(), and retainAll() when filtering a filtered
869 // collection.
870 FilteredSet<E> filtered = (FilteredSet<E>) unfiltered;
871 Predicate<E> combinedPredicate = Predicates.<E>and(filtered.predicate, predicate);
872 return new FilteredSet<E>((Set<E>) filtered.unfiltered, combinedPredicate);
873 }
874 return new FilteredSet<E>(checkNotNull(unfiltered), checkNotNull(predicate));
875 }
876
877 private static class FilteredSet<E> extends FilteredCollection<E>
878 implements Set<E> {

Callers 15

createEntrySetMethod · 0.95
createKeySetMethod · 0.95
FilteredEntryMapMethod · 0.95
filterCollectionMethod · 0.95
mergeNodesFromMethod · 0.95
mergeEdgesFromMethod · 0.95
createElementSetMethod · 0.95
createEntrySetMethod · 0.95
descendingSetMethod · 0.95
createEntriesMethod · 0.95
createKeySetMethod · 0.95
getDeclaredAnnotationMethod · 0.45

Calls 2

andMethod · 0.95
checkNotNullMethod · 0.45

Tested by

no test coverage detected