Java Code Examples for com.helger.commons.collection.impl.CommonsLinkedHashSet#addAll()

The following examples show how to use com.helger.commons.collection.impl.CommonsLinkedHashSet#addAll() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CollectionHelper.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Nonnull
@ReturnsMutableCopy
public static <ELEMENTTYPE> CommonsLinkedHashSet <ELEMENTTYPE> newOrderedSet (@Nullable final Collection <? extends ELEMENTTYPE> aCollection,
                                                                              @Nonnull final Predicate <? super ELEMENTTYPE> aFilter)
{
  if (isEmpty (aCollection))
    return newOrderedSet (0);
  final CommonsLinkedHashSet <ELEMENTTYPE> ret = newOrderedSet (aCollection.size ());
  ret.addAll (aCollection, aFilter);
  return ret;
}
 
Example 2
Source File: CollectionHelper.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Nonnull
@ReturnsMutableCopy
public static <ELEMENTTYPE> CommonsLinkedHashSet <ELEMENTTYPE> newOrderedSet (@Nullable final Iterable <? extends ELEMENTTYPE> aCont)
{
  final CommonsLinkedHashSet <ELEMENTTYPE> ret = newOrderedSet ();
  ret.addAll (aCont);
  return ret;
}
 
Example 3
Source File: CollectionHelper.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Nonnull
@ReturnsMutableCopy
public static <ELEMENTTYPE> CommonsLinkedHashSet <ELEMENTTYPE> newOrderedSet (@Nonnull final Iterator <? extends ELEMENTTYPE> aIter)
{
  final CommonsLinkedHashSet <ELEMENTTYPE> ret = newOrderedSet ();
  ret.addAll (aIter);
  return ret;
}
 
Example 4
Source File: CollectionHelper.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Nonnull
@ReturnsMutableCopy
public static <ELEMENTTYPE> CommonsLinkedHashSet <ELEMENTTYPE> newOrderedSet (@Nullable final Enumeration <? extends ELEMENTTYPE> aEnum)
{
  final CommonsLinkedHashSet <ELEMENTTYPE> ret = newOrderedSet ();
  ret.addAll (aEnum);
  return ret;
}