Apply path list and get result list list.

@param <R>      the type parameter
@param pathList the path list
@param function the function
@return the list
549968
public static <R> List<R> applyPathListAndGetResultList(List<Path> pathList,
			Function<Path, R> function) {
		return pathList.parallelStream().map(function).collect(toList());
	}
1028011
public static List<Path> getSubDirectoryPathList(Path startDirectoryPath,
			int maxDepth, Predicate<Path> filter) {
		return getSubPathList(startDirectoryPath, maxDepth,
				DirectoryAndNotSymbolicLinkFilter.and(filter));
	}
1245977
private static List<String> getPathList(File file) throws IOException {
        //Make sure the canonical file is being parsed
        file = file.getCanonicalFile();

        //Build a List of the parts of the path
        final List<String> pathParts = new LinkedList<String>();
        while (file != null) {
            pathParts.add(file.getName());
            file = file.getParentFile();
        }
        
        return pathParts;
    }
766639
public static String getFunctionParams( String function ) {
      return RegexpUtils.getMatcher( FUNCTION_PARAMS_PATTERN, true ).getGroupIfMatches( function, 1 );
   }
253008
@Override
  protected void buildClassPath(ArrayList<String> pathList)
  {
    if (! _classDir.getScheme().equals("file"))
      return;

    try {
      if (! _classDir.isDirectory() && _sourceDir.isDirectory()) {
        try {
          _classDir.mkdirs();
        } catch (IOException e) {
        }
      }

      if (_classDir.isDirectory()) {
        String path = _classDir.getNativePath();

        if (! pathList.contains(path))
          pathList.add(path);
      }
    
      if (! _classDir.equals(_sourceDir)) {
        String path = _sourceDir.getNativePath();

        if (! pathList.contains(path))
          pathList.add(path);
      }
    } catch (java.security.AccessControlException e) {
      log.log(Level.WARNING, e.toString(), e);
    }
  }
1006903
public static <T> Optional<List<T>> getList(final Map map, final Class<T> clazz, final Object... path) {
        return get(map, List.class, path).map(c -> (List<T>) c);
    }
445552
public static List<Path> getSubPathList(Path startDirectoryPath,
			int maxDepth) {
		return getSubPathList(startDirectoryPath, maxDepth,
				JMPredicate.getTrue());
	}
857589
public static <T> List<T> getNullableList(final Map map, final Class<T> clazz, final Object... path) {
        return (List<T>) getNullable(map, List.class, path);
    }
907860
public <A> ListPath<A, PathBuilder<A>> getList(String property, Class<A> type) {
        return this.<A, PathBuilder<A>>getList(property, type, PathBuilder.class);
    }
842023
private static String matchPathLists(List<String> r,List<String> f) {
		int i;
		int j;
		String s;
		// start at the beginning of the lists
		// iterate while both lists are equal
		s = "";
		i = r.size()-1;
		j = f.size()-1;

		// first eliminate common root
		while((i >= 0)&&(j >= 0)&&(r.get(i).equals(f.get(j)))) {
			i--;
			j--;
		}

		// for each remaining level in the home path, add a ..
		for(;i>=0;i--) {
			s += ".." + File.separator;
		}

		// for each level in the file path, add the path
		for(;j>=1;j--) {
			s += f.get(j) + File.separator;
		}

		// file name
		s += f.get(j);
		return s;
	}
1156881
function getList(getList, list, cb) {
			
			/* set route from config and run middleware */
			debug.sockets('run list', getList.key);
			
			if(globalOnlyRoutes && globalOnlyRoutes.indexOf(getList.key) < 0) {
				return cb({
					path: getList.path, 
					success: false, 
					error: 'Not Allowed'
				});
			}
			
			if(globalExcludeRoutes && globalExcludeRoutes.indexOf(getList.key) > -1) {
				return cb({
					path: getList.path, 
					success: false, 
					error: 'Not Allowed'
				});
			}
			
			var listConfig = opts.lists[getList.key];
			
			if(_.isObject(listConfig)) {
				var excludes = listConfig.exclude ? listConfig.exclude.split(/[\s,]+/) : [];
				if(excludes.indexOf('list') > -1) {
					return cb({
						path: getList.path, 
						success: false, 
						error: 'Not Allowed'
					});
				}
			}
			
			var me = configMe(opts, getList.key, 'list', false,  live);
			
			debug.sockets('runAction for me', me);
											
			list.list = getList;
			// add opts
			list.list.apiOptions = opts;
			
			runAction.call(live, me, list, socket, function(err) {
				debug.sockets('## runAction callback for ' + list.list.key);
				if(err) {
					debug.sockets( '#### Err  ', err);
					cb({
						path: getList.path, 
						success: false, 
						error: err.message
					});
				} else {
					me.route.call(live, list, req, socket, function(err, docs) {
						debug.sockets('got docs from list... run postware',list.list.key, err);
						if(docs) {
							runPostware.call(live, list.list.path, docs, socket, me.postware, function(err, a, manipulatedDocs, b) {
								debug.sockets('done.. send docs',list.list.key, err);
								// send data to listeners
								cb({
									path: getList.path, 
									data: manipulatedDocs || docs, 
									success: true
								});
							});
						} else {
							// fail
							debug.sockets('## FAIL ## in route call');
							cb({
								path: getList.path, 
								success: false, 
								error: err.message
							});
						}
					});
				}
			});
		}
407664
public static List<Path> getSubFilePathList(Path startDirectoryPath,
			Predicate<Path> filter) {
		return getSubPathList(startDirectoryPath,
				RegularFileFilter.and(filter));
	}
552229
@Override
    public <B> ListT<W,B> map(final Function<? super T, ? extends B> f) {
        return of(run.map(o -> o.map(f)));
    }
574204
public static Object evaluate(Object jsonPathResult, String jsonPathFunction) {
        switch (jsonPathFunction) {
            case "exists":
                return jsonPathResult != null;
            case "size":
                if (jsonPathResult instanceof JSONArray) {
                    return ((JSONArray) jsonPathResult).size();
                } else if (jsonPathResult instanceof JSONObject) {
                    return ((JSONObject) jsonPathResult).size();
                } else {
                    return jsonPathResult != null ? 1 : 0;
                }
            case "keySet":
                if (jsonPathResult instanceof JSONObject) {
                    return ((JSONObject) jsonPathResult).keySet();
                } else {
                    return Collections.emptySet();
                }
            case "values":
                if (jsonPathResult instanceof JSONObject) {
                    Object[] valueObjects = ((JSONObject) jsonPathResult).values().toArray();
                    List<String> values = new ArrayList<>(valueObjects.length);
                    for (Object value : valueObjects) {
                        if (value instanceof JSONObject) {
                            values.add(((JSONObject) value).toJSONString());
                        } else if (value instanceof JSONArray) {
                            values.add(((JSONArray) value).toJSONString());
                        } else {
                            values.add(String.valueOf(value));
                        }
                    }

                    return values.toString();
                } else {
                    return new Object[]{};
                }
            case "toString":
                if (jsonPathResult instanceof JSONArray) {
                    return ((JSONArray) jsonPathResult).toJSONString();
                } else if (jsonPathResult instanceof JSONObject) {
                    return ((JSONObject) jsonPathResult).toJSONString();
                } else {
                    return jsonPathResult.toString();
                }
        }

        return jsonPathResult;
    }
134728
public static void consumePathList(List<Path> pathList,
			Consumer<Path> consumer) {
		for (Path path : pathList)
			consumer.accept(path);
	}
702724
static Map<String, String> findPathParams(String baseParam, Method method) {
        Map<String, String> hrefVars = new HashMap<>();
        for (Annotation[] paramAnnotations : method.getParameterAnnotations()) {
            for (Annotation paramAnnotation : paramAnnotations) {
                if (paramAnnotation.annotationType().equals(PathParam.class)) {
                    String varName = ((PathParam) paramAnnotation).value();
                    addHrefVar(baseParam, hrefVars, varName);
                }
            }
        }
        return hrefVars;
    }
887269
def find_target_paths(target_functions):
    
    # Create our results list
    results = set()

    # Loop for each target function
    for target_function in target_functions:
        results = results.union(__find_target_paths(target_function))

    return results