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

The following examples show how to use com.helger.commons.collection.impl.CommonsLinkedHashSet#add() . 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 ELEMENTTYPE aValue)
{
  final CommonsLinkedHashSet <ELEMENTTYPE> ret = newOrderedSet (1);
  ret.add (aValue);
  return ret;
}
 
Example 2
Source File: PrimitiveCollectionHelper.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Nonnull
@ReturnsMutableCopy
public static CommonsLinkedHashSet <Boolean> newPrimitiveOrderedSet (@Nullable final boolean... aValues)
{
  final CommonsLinkedHashSet <Boolean> ret = new CommonsLinkedHashSet <> ();
  if (aValues != null)
    for (final boolean aValue : aValues)
      ret.add (Boolean.valueOf (aValue));
  return ret;
}
 
Example 3
Source File: PrimitiveCollectionHelper.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Nonnull
@ReturnsMutableCopy
public static CommonsLinkedHashSet <Byte> newPrimitiveOrderedSet (@Nullable final byte... aValues)
{
  final CommonsLinkedHashSet <Byte> ret = new CommonsLinkedHashSet <> ();
  if (aValues != null)
    for (final byte aValue : aValues)
      ret.add (Byte.valueOf (aValue));
  return ret;
}
 
Example 4
Source File: PrimitiveCollectionHelper.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Nonnull
@ReturnsMutableCopy
public static CommonsLinkedHashSet <Character> newPrimitiveOrderedSet (@Nullable final char... aValues)
{
  final CommonsLinkedHashSet <Character> ret = new CommonsLinkedHashSet <> ();
  if (aValues != null)
    for (final char aValue : aValues)
      ret.add (Character.valueOf (aValue));
  return ret;
}
 
Example 5
Source File: PrimitiveCollectionHelper.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Nonnull
@ReturnsMutableCopy
public static CommonsLinkedHashSet <Double> newPrimitiveOrderedSet (@Nullable final double... aValues)
{
  final CommonsLinkedHashSet <Double> ret = new CommonsLinkedHashSet <> ();
  if (aValues != null)
    for (final double aValue : aValues)
      ret.add (Double.valueOf (aValue));
  return ret;
}
 
Example 6
Source File: PrimitiveCollectionHelper.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Nonnull
@ReturnsMutableCopy
public static CommonsLinkedHashSet <Float> newPrimitiveOrderedSet (@Nullable final float... aValues)
{
  final CommonsLinkedHashSet <Float> ret = new CommonsLinkedHashSet <> ();
  if (aValues != null)
    for (final float aValue : aValues)
      ret.add (Float.valueOf (aValue));
  return ret;
}
 
Example 7
Source File: PrimitiveCollectionHelper.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Nonnull
@ReturnsMutableCopy
public static CommonsLinkedHashSet <Integer> newPrimitiveOrderedSet (@Nullable final int... aValues)
{
  final CommonsLinkedHashSet <Integer> ret = new CommonsLinkedHashSet <> ();
  if (aValues != null)
    for (final int aValue : aValues)
      ret.add (Integer.valueOf (aValue));
  return ret;
}
 
Example 8
Source File: PrimitiveCollectionHelper.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Nonnull
@ReturnsMutableCopy
public static CommonsLinkedHashSet <Long> newPrimitiveOrderedSet (@Nullable final long... aValues)
{
  final CommonsLinkedHashSet <Long> ret = new CommonsLinkedHashSet <> ();
  if (aValues != null)
    for (final long aValue : aValues)
      ret.add (Long.valueOf (aValue));
  return ret;
}
 
Example 9
Source File: PrimitiveCollectionHelper.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Nonnull
@ReturnsMutableCopy
public static CommonsLinkedHashSet <Short> newPrimitiveOrderedSet (@Nullable final short... aValues)
{
  final CommonsLinkedHashSet <Short> ret = new CommonsLinkedHashSet <> ();
  if (aValues != null)
    for (final short aValue : aValues)
      ret.add (Short.valueOf (aValue));
  return ret;
}