mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
29.33.2014 03ac71a0077ada536f72a815e271bcd73bae1399
opendj-sdk/opends/src/server/org/opends/server/util/CollectionUtils.java
@@ -66,6 +66,20 @@
  }
  /**
   * Creates a new {@link List} with the provided elements.
   *
   * @param <E>
   *          the elements' type
   * @param elements
   *          the elements to add to the new List
   * @return a new ArrayList with the provided elements
   */
  public static <E> List<E> newList(E... elements)
  {
    return newArrayList(elements);
  }
  /**
   * Creates a new {@link HashSet} with the provided elements.
   *
   * @param <E>
@@ -106,4 +120,32 @@
  {
    return new TreeSet<E>(Arrays.asList(elements));
  }
  /**
   * Creates a new {@link SortedSet} with the provided elements.
   *
   * @param <E>
   *          the elements' type
   * @param elements
   *          the elements to add to the new SortedSet
   * @return a new TreeSet with the provided elements
   */
  public static <E> SortedSet<E> newSortedSet(E... elements)
  {
    return newTreeSet(elements);
  }
  /**
   * Creates a new {@link Set} with the provided elements.
   *
   * @param <E>
   *          the elements' type
   * @param elements
   *          the elements to add to the new Set
   * @return a new TreeSet with the provided elements
   */
  public static <E> Set<E> newSet(E... elements)
  {
    return newHashSet(elements);
  }
}