Exemplo n.º 1
0
 def getMatchingAndUpstream(cls, allNodes, dependencyGraph, matcher):
     """ generated source for method getMatchingAndUpstream """
     results = Sets.newHashSet()
     toTry = Queues.newArrayDeque()
     toTry.addAll(Collections2.filter(allNodes, matcher))
     while not toTry.isEmpty():
         if not results.contains(curElem):
             results.add(curElem)
             toTry.addAll(dependencyGraph.get(curElem))
     return ImmutableSet.copyOf(results)
Exemplo n.º 2
0
 def cleanUpIrrelevantRules(cls, expandedRules):
     """ generated source for method cleanUpIrrelevantRules """
     model = SentenceFormModelFactory.create(expandedRules)
     return ImmutableList.copyOf(Collections2.filter(expandedRules, Predicate()))