Java Code Examples for com.helger.commons.collection.impl.CommonsTreeMap#putAll()

The following examples show how to use com.helger.commons.collection.impl.CommonsTreeMap#putAll() . 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 <KEYTYPE extends Comparable <? super KEYTYPE>, VALUETYPE> CommonsTreeMap <KEYTYPE, VALUETYPE> newSortedMap (@Nullable final Map <KEYTYPE, VALUETYPE> aMap,
                                                                                                                          @Nonnull final Predicate <? super Map.Entry <? extends KEYTYPE, ? extends VALUETYPE>> aFilter)
{
  final CommonsTreeMap <KEYTYPE, VALUETYPE> ret = newSortedMap ();
  ret.putAll (aMap, 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 <KEYTYPE extends Comparable <? super KEYTYPE>, VALUETYPE> CommonsTreeMap <KEYTYPE, VALUETYPE> newSortedMap (@Nullable final Map <? extends KEYTYPE, ? extends VALUETYPE> aMap)
{
  if (isEmpty (aMap))
    return newSortedMap ();

  final CommonsTreeMap <KEYTYPE, VALUETYPE> ret = newSortedMap ();
  ret.putAll (aMap);
  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 <KEYTYPE extends Comparable <? super KEYTYPE>, VALUETYPE> CommonsTreeMap <KEYTYPE, VALUETYPE> newSortedMap (@Nullable final Map <? extends KEYTYPE, ? extends VALUETYPE> [] aMaps)
{
  if (aMaps == null || aMaps.length == 0)
    return newSortedMap ();

  final CommonsTreeMap <KEYTYPE, VALUETYPE> ret = newSortedMap ();
  for (final Map <? extends KEYTYPE, ? extends VALUETYPE> aMap : aMaps)
    ret.putAll (aMap);
  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 <KEYTYPE extends Comparable <? super KEYTYPE>, VALUETYPE> CommonsTreeMap <KEYTYPE, VALUETYPE> newSortedMap (@Nullable final Collection <? extends Map.Entry <KEYTYPE, VALUETYPE>> aCollection)
{
  if (isEmpty (aCollection))
    return newSortedMap ();

  final CommonsTreeMap <KEYTYPE, VALUETYPE> ret = newSortedMap ();
  ret.putAll (aCollection);
  return ret;
}
 
Example 5
Source File: CollectionHelper.java    From ph-commons with Apache License 2.0 5 votes vote down vote up
@Nonnull
@ReturnsMutableCopy
public static <KEYTYPE extends Comparable <? super KEYTYPE>, VALUETYPE> CommonsTreeMap <KEYTYPE, VALUETYPE> newSortedMap (@Nullable final Iterable <? extends Map.Entry <KEYTYPE, VALUETYPE>> aCollection)
{
  if (isEmpty (aCollection))
    return newSortedMap ();

  final CommonsTreeMap <KEYTYPE, VALUETYPE> ret = newSortedMap ();
  ret.putAll (aCollection);
  return ret;
}