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

Method filter

src/org/antlr/codebuff/misc/BuffUtils.java:34–42  ·  view source on GitHub ↗
(List<T> data, Predicate<T> pred)

Source from the content-addressed store, hash-verified

32 }
33
34 public static <T> List<T> filter(List<T> data, Predicate<T> pred) {
35 List<T> output = new ArrayList<>();
36 if ( data!=null ) for (T x : data) {
37 if ( pred.test(x) ) {
38 output.add(x);
39 }
40 }
41 return output;
42 }
43
44 public static <T> List<T> filter(Collection<T> data, Predicate<T> pred) {
45 List<T> output = new ArrayList<>();

Callers 13

getSeparatorsMethod · 0.95
writePythonMethod · 0.95
getPreviousWSMethod · 0.45
getMatchingLeftSymbolMethod · 0.45
getWSEditDistanceMethod · 0.45
formatMethod · 0.45
mainMethod · 0.45
validateDocumentsMethod · 0.45
validateMethod · 0.45
mainMethod · 0.45

Calls 2

addMethod · 0.65
testMethod · 0.45

Tested by 1

writePythonMethod · 0.76