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

The following examples show how to use com.helger.commons.collection.impl.CommonsHashSet#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> CommonsHashSet <ELEMENTTYPE> newSet (@Nullable final ELEMENTTYPE aValue)
{
  final CommonsHashSet <ELEMENTTYPE> ret = newSet (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 CommonsHashSet <Boolean> newPrimitiveSet (@Nullable final boolean... aValues)
{
  final CommonsHashSet <Boolean> ret = new CommonsHashSet <> ();
  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 CommonsHashSet <Byte> newPrimitiveSet (@Nullable final byte... aValues)
{
  final CommonsHashSet <Byte> ret = new CommonsHashSet <> ();
  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 CommonsHashSet <Character> newPrimitiveSet (@Nullable final char... aValues)
{
  final CommonsHashSet <Character> ret = new CommonsHashSet <> ();
  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 CommonsHashSet <Double> newPrimitiveSet (@Nullable final double... aValues)
{
  final CommonsHashSet <Double> ret = new CommonsHashSet <> ();
  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 CommonsHashSet <Float> newPrimitiveSet (@Nullable final float... aValues)
{
  final CommonsHashSet <Float> ret = new CommonsHashSet <> ();
  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 CommonsHashSet <Integer> newPrimitiveSet (@Nullable final int... aValues)
{
  final CommonsHashSet <Integer> ret = new CommonsHashSet <> ();
  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 CommonsHashSet <Long> newPrimitiveSet (@Nullable final long... aValues)
{
  final CommonsHashSet <Long> ret = new CommonsHashSet <> ();
  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 CommonsHashSet <Short> newPrimitiveSet (@Nullable final short... aValues)
{
  final CommonsHashSet <Short> ret = new CommonsHashSet <> ();
  if (aValues != null)
    for (final short aValue : aValues)
      ret.add (Short.valueOf (aValue));
  return ret;
}