Exemplo n.º 1
0
  /**
   * 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()]);
  }
Exemplo n.º 2
0
  /**
   * 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()]);
  }