/** * Returns an array of Integer with the flags of every dependency from a list of dependencies. * * @param dependencyList List of dependencies * @return Integer[] with all flags of the dependencies */ public static Integer[] getArrayOfFlags(List<Dependency> dependencyList) { List<Integer> flagsList = new LinkedList<Integer>(); for (Dependency dependency : dependencyList) { flagsList.add(dependency.getFlags()); } return flagsList.toArray(new Integer[flagsList.size()]); }
/** * Returns an array of Integer with the flags of every dependency from a list of dependencies. * * @param dependencies List of dependencies * @return Integer[] with all flags of the dependencies */ public static Integer[] getArrayOfFlags(Map<String, Dependency> dependencies) { List<Integer> flagsList = new LinkedList<Integer>(); for (Dependency dependency : dependencies.values()) { flagsList.add(dependency.getFlags()); } return flagsList.toArray(new Integer[flagsList.size()]); }