Esempio n. 1
0
  /**
   * Returns an array of String with the name of every dependency from a list of dependencies.
   *
   * @param dependencies List of dependencies
   * @return String[] with all names of the dependencies
   */
  public static String[] getArrayOfNames(Map<String, Dependency> dependencies) {
    List<String> nameList = new LinkedList<String>();

    for (Dependency dependency : dependencies.values()) {
      nameList.add(dependency.getName());
    }

    return nameList.toArray(new String[nameList.size()]);
  }
Esempio n. 2
0
  /**
   * Returns an array of String with the version of every dependency from a list of dependencies.
   *
   * @param dependencyList List of dependencies
   * @return String[] with all versions of the dependencies
   */
  public static String[] getArrayOfVersions(List<Dependency> dependencyList) {
    List<String> versionList = new LinkedList<String>();

    for (Dependency dependency : dependencyList) {
      versionList.add(dependency.getVersion());
    }

    return versionList.toArray(new String[versionList.size()]);
  }
Esempio n. 3
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()]);
  }
Esempio n. 4
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()]);
  }